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.

A303660 Number of ways to write 2*n+1 as p + 3^k + 5^m, where p is a prime, and k and m are nonnegative integers.

This page as a plain text file.
%I A303660 #10 Apr 28 2018 11:32:41
%S A303660 0,1,2,3,3,4,4,4,4,5,3,4,4,3,6,7,5,6,8,5,5,9,6,5,8,3,6,8,4,4,7,6,4,8,
%T A303660 6,5,9,4,4,8,3,6,8,7,4,9,6,4,9,5,5,9,6,6,11,7,7,9,5,3,8,5,3,9,7,7,11,
%U A303660 8,8,12
%N A303660 Number of ways to write 2*n+1 as p + 3^k + 5^m, where p is a prime, and k and m are nonnegative integers.
%C A303660 Note that a(21323543) = 0, i.e., the odd number 2*21323543 + 1 = 42647087 cannot be written as the sum of a prime, a power of 3 and a power of 5.
%H A303660 Zhi-Wei Sun, <a href="/A303660/b303660.txt">Table of n, a(n) for n = 1..10000</a>
%H A303660 Zhi-Wei Sun, <a href="http://maths.nju.edu.cn/~zwsun/116f.pdf">Mixed sums of primes and other terms</a>, in: Additive Number Theory (edited by D. Chudnovsky and G. Chudnovsky), pp. 341-353, Springer, New York, 2010.
%e A303660 a(2) = 1 since 2*2+1 = 3 + 3^0 + 5^0 with 3 prime.
%e A303660 a(3) = 2 since 2*3+1 = 3 + 3^1 + 5^0 = 5 + 3^0 + 5^0 with 3 and 5 prime.
%t A303660 tab={};Do[r=0;Do[If[PrimeQ[2n+1-5^x-3^y],r=r+1],{x,0,Log[5,2n]},{y,0,Log[3,2n+1-5^x]}];tab=Append[tab,r],{n,1,70}];Print[tab]
%Y A303660 Cf. A000040, A000244, A000351, A273812, A302982, A302984, A303233, A303234, A303338, A303363, A303389, A303393, A303399, A303428, A303401, A303432, A303434, A303539, A303540, A303541, A303543, A303601, A303637, A303639, A303656.
%K A303660 nonn
%O A303660 1,3
%A A303660 _Zhi-Wei Sun_, Apr 28 2018