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.

Showing 1-2 of 2 results.

A286302 Numbers n such that A133364(n) <= 1.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 8, 9, 10, 13, 16, 17, 22, 24, 25, 26, 31, 36, 58, 64, 76, 82, 120, 170, 193, 196, 214, 324, 328, 370, 412, 562, 676, 730, 10404
Offset: 1

Views

Author

Robert Israel, May 05 2017

Keywords

Comments

Numbers n such that there is at most one representation n = m+p with m in A001694 and p prime.
There are no more terms <= 10^7.
The only n <= 10^7 for which A133364(n) = 0 are 1, 2, and 5.
Conjecture: 10404 is the last term.

Crossrefs

Programs

  • Maple
    N:= 10^7: # to get all terms <= N
    q:= proc(x,N) local p,R;
          R:= {x};
          for p in numtheory:-factorset(x) do
            R:= map(t -> seq(t*p^i,i=0..floor(log[p](N/t))), R)
          od;
          R
    end proc:
    Pow:= `union`(seq(q(n^2,N),n=1..isqrt(N))):
    Primes:= select(isprime, [2,seq(i,i=3..N,2)]):
    CPow:= Vector(N): CPow[convert(Pow,list)]:= 1:
    CPrimes:= Vector(N): CPrimes[Primes]:= 1:
    Conv:= SignalProcessing:-Convolution(CPow,CPrimes):
    select(t -> Conv[t-1] < 1.5, [$2..N]);

A196228 Number of ways of writing n as sum of a prime and a perfect power.

Original entry on oeis.org

0, 0, 1, 1, 0, 2, 1, 1, 1, 1, 3, 2, 1, 2, 2, 1, 1, 2, 2, 2, 3, 1, 2, 1, 1, 1, 4, 2, 2, 3, 1, 4, 2, 2, 3, 1, 2, 5, 4, 2, 2, 2, 2, 3, 4, 2, 3, 2, 3, 2, 4, 2, 2, 3, 3, 4, 2, 1, 2, 2, 2, 4, 3, 1, 2, 3, 3, 5, 4, 2, 2, 3, 2, 2, 5, 1, 4, 2, 3, 4, 2, 1, 5, 3, 1, 4, 4
Offset: 1

Views

Author

Philippe Deléham, Sep 29 2011

Keywords

Comments

In this case, perfect power does not include 0.
Different from A133364. The first difference is at n=74, where a(n) = 2 but A133364(n) = 3.

Examples

			a(1) = a(2) = a(5) = a(1549) = a(1771561) = 0, see A119748.
		

Crossrefs

Cf. A119748 (zero terms).

Programs

  • Mathematica
    nn = 100; pwrs = Union[{1}, Flatten[Table[Range[2, Floor[nn^(1/ex)]]^ex, {ex, 2, Floor[Log[2, nn]]}]]]; pp = Prime[Range[PrimePi[nn]]]; t = Table[0, {nn}]; Do[ t[[i[[1]]]] = i[[2]], {i, Tally[Sort[Select[Flatten[Outer[Plus, pwrs, pp]], # <= nn &]]]}]; t (* T. D. Noe, Sep 29 2011 *)

Formula

a(n) = Card_{n=i+j where i is in A000040 and j is in A001597}.
G.f.: (Sum_{k>=1} x^prime(k))*(Sum_{k = i^j, i>=1, j>=2} x^k). - Ilya Gutkovskiy, Feb 18 2017

Extensions

Edited by Franklin T. Adams-Watters, Sep 29 2011
Showing 1-2 of 2 results.