Skip to main content
added 532 characters in body
Source Link
S.S. Anne
  • 3.4k
  • 11
  • 31

C (gcc), 6556 bytes

i;maini,c;main(c){formain(i=c;ii--+2;)printf("%d",2<-!2?i=c+=2:putchar(i-c+1&&i+249+(c+~i&&i+3));main(c+2);} 

Infinitely prints the sequence.

-1 byte thanks to RGSRGS!
-8 bytes thanks to ceilingcat!

Try it online!Try it online!

C (gcc), 46 bytes

i;f(n){for(i=0;n--;)printf("%d",i=i*100+121);} 

Stretches the rules and only works up to \$n=4\$.

Try it online!

C (gcc), 65 bytes

i;main(c){for(i=c;i--+2;)printf("%d",2-!(i-c+1&&i+2));main(c+2);} 

Infinitely prints the sequence.

-1 byte thanks to RGS!

Try it online!

C (gcc), 56 bytes

i,c;main(){main(i--<-2?i=c+=2:putchar(49+(c+~i&&i+3)));} 

-1 byte thanks to RGS!
-8 bytes thanks to ceilingcat!

Try it online!

C (gcc), 46 bytes

i;f(n){for(i=0;n--;)printf("%d",i=i*100+121);} 

Stretches the rules and only works up to \$n=4\$.

Try it online!

added 16 characters in body
Source Link
S.S. Anne
  • 3.4k
  • 11
  • 31

C (gcc), 68 6665 bytes

i;main(c){for(i=c;i--+2;)printf("%d ""%d",2-!(i-c+1&&i+2));main(c+2);} 

Infinitely prints the sequence.

Try it online!-1 byte thanks to RGS!

Try it online!

C (gcc), 68 66 bytes

i;main(c){for(i=c;i--+2;)printf("%d ",2-!(i-c+1&&i+2));main(c+2);} 

Infinitely prints the sequence.

Try it online!

C (gcc), 65 bytes

i;main(c){for(i=c;i--+2;)printf("%d",2-!(i-c+1&&i+2));main(c+2);} 

Infinitely prints the sequence.

-1 byte thanks to RGS!

Try it online!

deleted 97 characters in body
Source Link
S.S. Anne
  • 3.4k
  • 11
  • 31

C (gcc), 6868 66 bytes

fi;main(c,i){for(c=0;;c++)for(i=++c;ii=c;i--+2;)printf("%d ",2-!(i-c+1&&i+2));main(c+2);} 

Same as my solution to the other question but without the boilerplate.

Infinitely prints the sequence.

Try it online!Try it online!

C (gcc), 68 bytes

f(c,i){for(c=0;;c++)for(i=++c;i--+2;)printf("%d ",2-!(i-c+1&&i+2));} 

Same as my solution to the other question but without the boilerplate.

Infinitely prints the sequence.

Try it online!

C (gcc), 68 66 bytes

i;main(c){for(i=c;i--+2;)printf("%d ",2-!(i-c+1&&i+2));main(c+2);} 

Infinitely prints the sequence.

Try it online!

Source Link
S.S. Anne
  • 3.4k
  • 11
  • 31
Loading