login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Positive integers n such that the sum of the Pell numbers A000129(0) + ... + A000129(n-1) is divisible by n.
6

%I #23 Nov 11 2021 13:35:54

%S 3,4,5,7,8,11,13,16,17,19,23,24,29,31,32,37,41,43,47,48,53,59,61,64,

%T 67,71,72,73,79,83,89,96,97,101,103,107,109,113,120,127,128,131,137,

%U 139,144,149,151,157,163,167,168,169,173,179,181,191,192,193,197,199,211,216,223,227,229

%N Positive integers n such that the sum of the Pell numbers A000129(0) + ... + A000129(n-1) is divisible by n.

%C Sequence contains all odd primes because of the fact that ((1-sqrt(2))^p + (1+sqrt(2))^p - 2) is divisible by p where p is an odd prime.

%H Harvey P. Dale, <a href="/A270342/b270342.txt">Table of n, a(n) for n = 1..1000</a>

%e 3 is a term because 0 + 1 + 2 = 3 is divisible by 3.

%e 4 is a term because 0 + 1 + 2 + 5 = 8 is divisible by 4.

%e 5 is a term because 0 + 1 + 2 + 5 + 12 = 20 is divisible by 5.

%e 7 is a term because 0 + 1 + 2 + 5 + 12 + 20 + 79 = 119 is divisible by 7.

%t Module[{nn=250,pell},pell=LinearRecurrence[{2,1},{0,1},nn];Position[ Table[ Total[Take[pell,n]]/n,{n,nn}],_?(IntegerQ[#]&)]]//Flatten (* _Harvey P. Dale_, Nov 11 2021 *)

%o (PARI) a048739(n) = local(w=quadgen(8)); -1/2+(3/4+1/2*w)*(1+w)^n+(3/4-1/2*w)*(1-w)^n;

%o for(n=1, 1e3, if(a048739(n-1) % (n+1) == 0, print1(n+1, ", ")));

%Y Cf. A000040, A000129, A048739.

%K nonn

%O 1,1

%A _Altug Alkan_, Mar 15 2016