login
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

%I #22 Jan 09 2025 13:20:11

%S 1,1,0,3,5,29,152,136,2016,10959,26840,1056437,2495955,16311831,

%T 102287808,1627690024,10021808981,25377192720,1085424779823,

%U 2681584376185,17876295136009,113220181313816,1933742696582736

%N 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.

%C This differs only trivially from the better-defined A092330. - _John Blythe Dobson_, Sep 20 2014

%p A176951aux := proc(n)

%p if n = 0 then

%p 0;

%p elif combinat[fibonacci](n+1) mod n = 0 then

%p combinat[fibonacci](n+1)/n ;

%p elif combinat[fibonacci](n-1) mod n = 0 then

%p combinat[fibonacci](n-1)/n ;

%p else

%p 0 ;

%p end if;

%p end proc:

%p A176951 := proc(n)

%p A176951aux(ithprime(n)) ;

%p end proc:

%p seq(A176951(n),n=1..20) ; # _R. J. Mathar_, Oct 29 2011

%t 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]]];

%t Table[f[Prime[n + 1]], {n, 0, 50}]

%o (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

%Y Cf. A092330.

%K nonn

%O 1,4

%A _Roger L. Bagula_, Apr 29 2010