A214228 a(n) = gcd(r,2*n+1) where r is 1 + (A143608(i-1) mod (2*n+1)) and A143608(i) is the first zero mod 2*n+1 other than i=0.
1, 1, 1, 1, 1, 1, 5, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 13, 1, 1, 5, 1, 1, 3, 1, 5, 1, 1, 1, 7, 1, 1, 23, 1, 1, 25, 7, 1, 1, 1, 5, 29, 1, 7, 31, 5, 1, 1, 1, 1, 35, 1, 1, 37, 1, 23, 13, 7, 1, 41, 1, 1, 1, 1, 7, 5, 1, 1, 47, 13, 1, 49, 1, 1, 9, 31, 1, 53
Offset: 1
Keywords
Examples
a(7) = 5 which is a factor of 2*7+1.
Crossrefs
Cf. A143608.
Programs
-
Maple
A214228 := proc(n) local i,r ; i := 1; while A143608(i) mod (2*n+1) <> 0 do i := i+1 ; end do; r := 1+(A143608(i-1) mod (2*n+1)) ; gcd(r,2*n+1) ; end proc: # R. J. Mathar, Jul 22 2012
-
Mathematica
gcdN1[x_,y_] = GCD[x + 1,y]; r0 = 3; Reap[While[r0 < 200, s1=1; s0=0; count=1; While[True, count++; temp=Mod[4*s1 - s0, r0]; If[temp==0, Break[]]; count++; s0 = s1; s1 = temp; temp=Mod[2*s1-s0,r0]; If[temp == 0, Break[]]; s0 = s1; s1 = temp;]; Sow[gcdN1[s1, r0], c]; r0+=2;]][[2,1]]
Comments