Skip to main content
replaced http://codegolf.stackexchange.com/ with https://codegolf.stackexchange.com/
Source Link

PARI/GP, 76 73 bytes

Saved three bytes courtesy of Mitch SchwartzMitch Schwartz.

for(n=b=!a=1,99,b=a+a=b;print(if(b%2,"",Fibo)if(b%3,if(b%2,b,""),Nacci)))

Sample Usage

$ gp -qf < fibo-nacci.gp

PARI/GP, 76 73 bytes

Saved three bytes courtesy of Mitch Schwartz.

for(n=b=!a=1,99,b=a+a=b;print(if(b%2,"",Fibo)if(b%3,if(b%2,b,""),Nacci)))

Sample Usage

$ gp -qf < fibo-nacci.gp

PARI/GP, 76 73 bytes

Saved three bytes courtesy of Mitch Schwartz.

for(n=b=!a=1,99,b=a+a=b;print(if(b%2,"",Fibo)if(b%3,if(b%2,b,""),Nacci)))

Sample Usage

$ gp -qf < fibo-nacci.gp
added 145 characters in body
Source Link
primo
  • 33.5k
  • 5
  • 61
  • 139

PARI/GP, 76 73 bytes

Saved three bytes courtesy of Mitch Schwartz.

for(n=b=!a=1,99,b=a+a=b;print(if(b%2,"",Fibo)if(b%3,if(b%2,b,""),Nacci)))

Sample Usage

$ gp -qf < fibo-nacci.gp

PARI/GP, 73 bytes

for(n=b=!a=1,99,b=a+a=b;print(if(b%2,"",Fibo)if(b%3,if(b%2,b,""),Nacci)))

Sample Usage

$ gp -qf < fibo-nacci.gp

PARI/GP, 76 73 bytes

Saved three bytes courtesy of Mitch Schwartz.

for(n=b=!a=1,99,b=a+a=b;print(if(b%2,"",Fibo)if(b%3,if(b%2,b,""),Nacci)))

Sample Usage

$ gp -qf < fibo-nacci.gp
deleted 3 characters in body
Source Link
primo
  • 33.5k
  • 5
  • 61
  • 139

PARI/GP, 7673 bytes

for(n=1n=b=!a=1,10099,f=fibonacci(n);printb=a+a=b;print(if(f%2b%2,"",Fibo)if(f%3b%3,if(f%2b%2,fb,""),Nacci)))

Sample Usage

$ gp -qf < fibo-nacci.gp

PARI/GP, 76 bytes

for(n=1,100,f=fibonacci(n);print(if(f%2,"",Fibo)if(f%3,if(f%2,f,""),Nacci)))

Sample Usage

$ gp -qf < fibo-nacci.gp

PARI/GP, 73 bytes

for(n=b=!a=1,99,b=a+a=b;print(if(b%2,"",Fibo)if(b%3,if(b%2,b,""),Nacci)))

Sample Usage

$ gp -qf < fibo-nacci.gp
Source Link
primo
  • 33.5k
  • 5
  • 61
  • 139
Loading