OFFSET
0,1
COMMENTS
The sequence ..., 14, 29, 10, 2, 9, 2, 0, [5], 0, 6, 3, 18, 10, 57, 42, ...
(the number in square brackets at index 0) equals the trace of:
[ 0 0 0 0-1 ]
[ 1 0 0 0 0 ]
[ 0 1 0 0 1 ]^(+n)
[ 0 0 1 0 3 ]
[ 0 0 0 1 0 ]
or
[ 0 0 0 0-1 ]
[ 1 0 0 0 0 ]
[ 0 1 0 0 3 ]^(-n)
[ 0 0 1 0 1 ]
[ 0 0 0 1 0 ]
Its characteristic polynomial is (x^2 +/- x - 1) * (x^3 -/+ x^2 -/+ x - 1); these factors are Fibonacci and tribonacci polynomials. The ratio of negative terms approaches the golden ratio; the ratio of positive terms approaches the tribonacci constant.
Prime numbers p divide a(+p) and a(-p), as the trace of a matrix M^p (mod p) is constant.
Nonprimes c very rarely divide a(+c) and a(-c) simultaneously. The only known dual pseudoprime in the sequence is 1.
The distribution of residues induces gaps between pseudoprimes having roughly the size of c. For example, after 1034881 there is a gap of more than one million terms without either variety of pseudoprime.
Pseudoprimes appear limited to squared primes and squarefree numbers with three or more prime factors. 11 and 13 are more common than other factors.
Positive pseudoprimes: c | a(+c)
----------------------------------------------
1
3481. . . . 59^2
17143 . . . 7 31 79
105589. . . 11 29 331
635335. . . 5 283 449
2992191 . . 3 29 163 211
3659569 . . 1913^2
Negative pseudoprimes: c | a(-c)
----------------------------------------------
1
9 . . . . . 3^2
806 . . . . 2 13 31
1419. . . . 3 11 43
6241. . . . 79^2
6721. . . . 11 13 47
12749 . . . 11 19 61
21106 . . . 2 61 173
38714 . . . 2 13 1489
146689. . . 383^2
649621. . . 7 17 53 103
1034881 . . 41 43 587
LINKS
G. C. Greubel, Table of n, a(n) for n = 0..1000
Index entries for linear recurrences with constant coefficients, signature (0,3,1,0,-1).
FORMULA
MATHEMATICA
LinearRecurrence[{0, 3, 1, 0, -1}, {5, 0, 6, 3, 18}, 40] (* G. C. Greubel, Apr 23 2019 *)
PROG
(PARI) my(x='x+O('x^40)); Vec((5-9*x^2-2*x^3)/((1+x-x^2)*(1-x-x^2-x^3))) \\ G. C. Greubel, Apr 23 2019
(Magma) R<x>:=PowerSeriesRing(Integers(), 40); Coefficients(R!( (5-9*x^2 -2*x^3)/((1+x-x^2)*(1-x-x^2-x^3)) )); // G. C. Greubel, Apr 23 2019
(SageMath) ((5-9*x^2-2*x^3)/((1+x-x^2)*(1-x-x^2-x^3))).series(x, 40).coefficients(x, sparse=False) # G. C. Greubel, Apr 23 2019
CROSSREFS
KEYWORD
nonn,easy
AUTHOR
Reikku Kulon, May 23 2011
STATUS
approved