login
Pell pseudoprimes: odd composite numbers n such that P(n)-Kronecker(2,n) is divisible by n.
7

%I #35 Jul 31 2023 23:25:04

%S 169,385,741,961,1121,2001,3827,4879,5719,6215,6265,6441,6479,6601,

%T 7055,7801,8119,9799,10945,11395,13067,13079,13601,15841,18241,19097,

%U 20833,20951,24727,27839,27971,29183,29953,31417,31535,34561,35459,37345

%N Pell pseudoprimes: odd composite numbers n such that P(n)-Kronecker(2,n) is divisible by n.

%C Here P(n) are the Pell numbers (A000129), defined by P(0)=0, P(1)=1, P(x) = 2*P(x-1) + P(x-2) and Kronecker(2,n) is equal to 1 if n is congruent to +-1 mod 8 and equal to -1 if n is congruent to +-3 mod 8.

%H Amiram Eldar, <a href="/A099011/b099011.txt">Table of n, a(n) for n = 1..10000</a> (from Dana Jacobsen's site, terms 1..200 from Ralf Stephan)

%H Antonio J. Di Scala, Nadir Murru, and Carlo Sanna, <a href="https://arxiv.org/abs/2001.00353">Lucas pseudoprimes and the Pell conic</a>, arXiv:2001.00353 [math.NT], 2020.

%H Dana Jacobsen, <a href="http://ntheory.org/pseudoprimes.html">Pseudoprime Statistics, Tables, and Data</a> (includes terms to 5e12)

%e 169 is a Pell pseudoprime because P(169)-Kronecker(2,169) is divisible by 169.

%t pell[0] = 0; pell[1] = 1; pell[n_] := pell[n] = 2*pell[n - 1] + pell[n - 2]; pellpspQ[n_] := OddQ[n] && CompositeQ[n] && Divisible[pell[n] - JacobiSymbol[2, n], n]; Select[Range[40000], pellpspQ] (* _Amiram Eldar_, Nov 22 2019 *)

%o (Perl)

%o use Math::Prime::Util qw/:all/;

%o my($U,$V);

%o foroddcomposites {

%o ($U,$V) = lucas_sequence($_, 2, -1, $_);

%o $U = ($U - kronecker(2,$_)) % $_;

%o print "$_\n" if $U == 0;

%o } 1e11; # _Dana Jacobsen_, Sep 13 2014

%o (PARI) genit(nterms=100)={my(arr=List(),q,z);forcomposite(n=9,+oo,if(n%2==0,next);q=([2,1;1,0]^n)[2,1];z=(q-kronecker(2,n))%n;if(z==0,listput(arr,n));if(#arr>=nterms,break));arr} \\ _Bill McEachen_, Jun 24 2023 (incorporates A000129 code of Greathouse)

%Y Cf. A000129.

%K nonn

%O 1,1

%A _Jack Brennen_, Nov 13 2004