A103389 Primes in A103379.
2, 3, 5, 7, 17, 31, 71, 127, 157, 227, 257, 293, 349, 419, 503, 8179, 65657, 68053, 72421, 80429, 258949, 493109, 16399511, 33609887, 34225183, 1387603957, 5575987679, 15932884421, 35689079297, 693128029907, 957136790429, 1129233918343, 10363690074667, 41632551979939, 10815125582078291
Offset: 1
Examples
A103379(20) = 3, which is prime, hence 3 is in this sequence.
Programs
-
Maple
A103379 := proc(n) option remember ; if n <= 12 then 1; else procname(n-11)+procname(n-12) ; fi; end: isA103379 := proc(n) option remember ; local i ; for i from 1 do if A103379(i) = n then RETURN(true) ; elif A103379(i) > n then RETURN(false) ; fi; od: end: A103389 := proc(n) option remember ; local a; if n = 1 then 2; else for a from procname(n-1)+1 do if isprime(a) then if isA103379(a) then RETURN(a) ; fi; fi; od: fi; end: for n from 1 to 37 do printf("%d, ",A103389(n)) ; od: # R. J. Mathar, Aug 30 2008
-
Mathematica
Clear[a]; k11; Do[a[n]=1, {n, k+1}]; a[n_]:=a[n]=a[n-k]+a[n-k-1]; A103389=Union[Select[Array[a, 1000], PrimeQ]] N[Solve[x^12 - x - 1 == 0, x], 111][[2]] (* Program, edit and extension by Ray Chandler and Robert G. Wilson v, irrelevant code deleted by M. F. Hasler, Sep 19 2015 *) Select[LinearRecurrence[{0,0,0,0,0,0,0,0,0,0,1,1},{1,1,1,1,1,1,1,1,1,1,1,1},700],PrimeQ]//Union (* Harvey P. Dale, Apr 22 2016 *)
-
PARI
{a=vector(m=12,n,1);L=0;for(n=m,10^5,isprime(a[i=n%m+1]+=a[(n+1)%m+1])&&LM. F. Hasler, Sep 19 2015
Extensions
Corrected from a(16) on by R. J. Mathar, Aug 30 2008
Edited and more terms added by M. F. Hasler, Sep 19 2015