A176951 Let p = prime(n). Then a(n) = Fibonacci(p+1)/p if this is an integer, otherwise a(n) = Fibonacci(p-1)/p if this is an integer, and fall back to a(n)=0 if both are non-integer.
1, 1, 0, 3, 5, 29, 152, 136, 2016, 10959, 26840, 1056437, 2495955, 16311831, 102287808, 1627690024, 10021808981, 25377192720, 1085424779823, 2681584376185, 17876295136009, 113220181313816, 1933742696582736
Offset: 1
Keywords
Links
- Harvey P. Dale, Table of n, a(n) for n = 1..647
Crossrefs
Cf. A092330.
Programs
-
Maple
A176951aux := proc(n) if n = 0 then 0; elif combinat[fibonacci](n+1) mod n = 0 then combinat[fibonacci](n+1)/n ; elif combinat[fibonacci](n-1) mod n = 0 then combinat[fibonacci](n-1)/n ; else 0 ; end if; end proc: A176951 := proc(n) A176951aux(ithprime(n)) ; end proc: seq(A176951(n),n=1..20) ; # R. J. Mathar, Oct 29 2011
-
Mathematica
f[n_] = If[n == 0, 0, If[Mod[Fibonacci[n + 1], n] == 0, Fibonacci[n + 1]/n, If[Mod[Fibonacci[n - 1], n] == 0, Fibonacci[n - 1]/n, 0]]]; Table[f[Prime[n + 1]], {n, 0, 50}] Table[With[{f1=Fibonacci[p+1],f2=Fibonacci[p-1]},Which[IntegerQ[f1/p],f1/p,IntegerQ[f2/p],f2/p,True,0]],{p,Prime[Range[30]]}] (* Harvey P. Dale, Jun 09 2025 *)
-
PARI
a(n)=my(p=prime(n),t);t=fibonacci(p+1);if(t%p==0,t/p,t=fibonacci(p-1);if(t%p==0,t/p,0)) \\ Charles R Greathouse IV, Oct 29 2011
Comments