cp's OEIS Frontend

This is a front-end for the Online Encyclopedia of Integer Sequences, made by Christian Perfect. The idea is to provide OEIS entries in non-ancient HTML, and then to think about how they're presented visually. The source code is on GitHub.

A154364 Number of ways to express n as the sum of an odd prime, a positive Pell number and a companion Pell number.

This page as a plain text file.
%I A154364 #26 May 31 2019 05:35:24
%S A154364 0,0,0,0,0,1,1,1,1,3,2,2,1,4,2,2,2,4,3,4,5,4,3,4,3,5,4,2,3,4,4,3,4,4,
%T A154364 3,4,4,7,4,4,3,6,3,6,5,6,4,8,5,7,4,5,3,7,5,5,5,5,4,5,3,6,4,4,4,7,4,6,
%U A154364 4,4,2,6,3,7,6,6,6,7,6,6,3,7,6,3,4,9,9
%N A154364 Number of ways to express n as the sum of an odd prime, a positive Pell number and a companion Pell number.
%C A154364 This is inspired by the sequence A154290 and related conjectures of Sun. On Jan 08 2009, Zhi-Wei Sun and Qing-Hu Hou conjectured that a(n)>0 for n=6,7,...; in other words, any integer n>5 can be written as the sum of an odd prime, a positive Pell number and a companian Pell number. The Pell numbers are defined by P_0=0, P_1=1 and P_{n+1}=2P_n+P_{n-1} (n=1,2,3,...) and the companion Pell numbers are given by Q_0=Q_1=2 and Q_{n+1}=2Q_n+Q_{n-1} (n=1,2,3...). Note that for n>5 both P_n and Q_n are greater than 2^n.
%C A154364 _D. S. McNeil_ disproved the conjecture by finding the 4 initial counterexamples: 169421772576, 189661491306, 257744272674, 534268276332. - _Zhi-Wei Sun_, Jan 17 2009
%C A154364 On Feb 01 2009, Zhi-Wei Sun observed that these 4 counterexamples are divisible by 42 and guessed that all counterexamples to the conjecture of Sun and Hou should be multiples of 42. - _Zhi-Wei Sun_, Feb 01 2009
%H A154364 Zhi-Wei Sun, <a href="/A154364/b154364.txt">Table of n, a(n), n=1..100000.</a>
%H A154364 R. Crocker, <a href="https://projecteuclid.org/euclid.pjm/1102971271">On a sum of a prime and two powers of two</a>, Pacific J. Math. 36(1971), 103-107.
%H A154364 D. S. McNeil, <a href="https://listserv.nodak.edu/cgi-bin/wa.exe?A2=NMBRTHRY;bda1acb4.0812">Sun's strong conjecture</a>, NMBRTHRY, Dec 2008.
%H A154364 Z. W. Sun, <a href="https://doi.org/10.1090/S0002-9939-1995-1242105-X">A congruence for primes</a>, Proc. Amer. Math. Soc. 123(1995), 1341-1346.
%H A154364 Zhi-Wei Sun, <a href="https://listserv.nodak.edu/cgi-bin/wa.exe?A2=NMBRTHRY;6434d742.0812">A promising conjecture: n=p+F_s+F_t</a>, NMBRTHRY, Dec 2008.
%H A154364 Zhi-Wei Sun, <a href="https://listserv.nodak.edu/cgi-bin/wa.exe?A2=NMBRTHRY;a9e706e.0812">A summary concerning my conjecture n=p+F_s+F_t</a>, NMBRTHRY, Dec 2008.
%H A154364 Terence Tao, <a href="https://arxiv.org/abs/0802.3361">A remark on primality testing and decimal expansions</a>, arXiv:0802.3361 [math.NT], 2008-2010.
%H A154364 Terence Tao, <a href="https://doi.org/10.1017/S1446788712000043">A remark on primality testing and decimal expansions</a>, Journal of the Australian Mathematical Society 91:3 (2011), pp. 405-413.
%e A154364 For n=10 the a(10)=3 solutions are 3+5+2, 3+1+6, 7+1+2.
%p A154364 Pell:=proc(n) if n=0 then return(0); elif n=1 then return(1); else return( 2*Pell(n-1) + Pell(n-2) ); fi; end proc: comp_Pell:=proc(n) if n=0 then return(2); elif n=1 then return(2); else return( 2*comp_Pell(n-1) + comp_Pell(n-2) ); fi; end proc: for n from 1 to 10^5 do rep_num:=0; for i from 1 while Pell(i)<n do for j from 1 while Pell(i)+comp_Pell(j)<n do p:=n-Pell(i)-comp_Pell(j); if (p>2) and isprime(p) then rep_num:=rep_num+1; fi; od; od; printf("%d %d\n", n, rep_num); od:
%t A154364 nmax = 10^3;
%t A154364 Pell[n_] := Pell[n] = If[n == 0, Return[0], If[n == 1, Return[1], Return[2* Pell[n - 1] + Pell[n - 2]]]];
%t A154364 compPell[n_] := compPell[n] = If[n == 0, Return[2], If[n == 1, Return[2],  Return[2*compPell[n - 1] + compPell[n - 2]]]];
%t A154364 Reap[For[n = 1, n <= nmax, n++, repnum = 0; For[i = 1, Pell[i] < n, i++, For[j = 1, Pell[i] + compPell[j] < n, j++, p = n - Pell[i] - compPell[j]; If[p > 2 && PrimeQ[p], repnum++]]]; Sow[repnum]]][[2, 1]] (* _Jean-François Alcover_, Dec 13 2017, translated from Maple *)
%Y A154364 Cf. A000040, A000129, A002203, A154290, A154257, A154285, A156695.
%K A154364 nonn
%O A154364 1,10
%A A154364 _Zhi-Wei Sun_, Jan 07 2009