OFFSET
1,2
COMMENTS
The 7th-order linear recurrence A104622 (heptanacci-Lucas numbers) is a generalization of the Lucas sequence A000032. T. D. Noe and I have noted that the heptanacci-Lucas numbers have many more primes than the corresponding heptanacci (see A104414) which he found has only the first 3 primes that I identified through the first 5000 values, whereas these heptanacci-Lucas numbers have 17 primes among the first 100 values. For semiprimes in heptanacci-Lucas numbers, see A104623.
LINKS
Mario Catalani, Polymatrix and Generalized Polynacci Numbers, arXiv:math.CO/0210201 v1, Oct 14 2002
Tony D. Noe and Jonathan Vos Post, Primes in Fibonacci n-step and Lucas n-step Sequences, J. of Integer Sequences, Vol. 8 (2005), Article 05.4.4
FORMULA
Prime values of the heptanacci-Lucas numbers, which are defined by: a(0) = 7, a(1) = 1, a(2) = 3, a(3) = 7, a(4) = 15, a(5) = 31, a(6) = 63, for n > 6: a(n) = a(n-1)+a(n-2)+a(n-3)+a(n-4)+a(n-5)+a(n-6)+a(n-7).
EXAMPLE
MATHEMATICA
a[0] = 7; a[1] = 1; a[2] = 3; a[3] = 7; a[4] = 15; a[5] = 31; a[6] = 63; a[n_] := a[n] = a[n - 1] + a[n - 2] + a[n - 3] + a[n - 4] + a[n - 5] + a[n - 6] + a[n - 7]; Do[ If[ PrimeQ[ a[n]], Print[n]], {n, 5000}] (* Robert G. Wilson v, Mar 17 2005 *)
Flatten[Position[LinearRecurrence[{1, 1, 1, 1, 1, 1, 1}, {7, 1, 3, 7, 15, 31, 63}, 28000], _?PrimeQ]]-1 (* Harvey P. Dale, Jan 02 2016 *)
CROSSREFS
KEYWORD
easy,nonn
AUTHOR
Jonathan Vos Post, Mar 17 2005
EXTENSIONS
More terms from T. D. Noe and Robert G. Wilson v, Mar 17 2005
STATUS
approved