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-10 of 10 results.

A014092 Numbers that are not the sum of 2 primes.

Original entry on oeis.org

1, 2, 3, 11, 17, 23, 27, 29, 35, 37, 41, 47, 51, 53, 57, 59, 65, 67, 71, 77, 79, 83, 87, 89, 93, 95, 97, 101, 107, 113, 117, 119, 121, 123, 125, 127, 131, 135, 137, 143, 145, 147, 149, 155, 157, 161, 163, 167, 171, 173, 177, 179, 185, 187, 189, 191, 197, 203, 205, 207, 209
Offset: 1

Views

Author

Keywords

Comments

Suggested by the Goldbach conjecture that every even number larger than 2 is the sum of 2 primes.
Since (if we believe the Goldbach conjecture) all the entries > 2 in this sequence are odd, they are equal to 2 + an odd composite number (or 1).
Otherwise said, the sequence consists of 2 and odd numbers k such that k-2 is not prime. In particular there is no element from A006512, greater of a twin prime pair. - M. F. Hasler, Sep 18 2012
Values of k such that A061358(k) = 0. - Emeric Deutsch, Apr 03 2006
Values of k such that A073610(k) = 0. - Graeme McRae, Jul 18 2006

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, Section 2.8 (for Goldbach conjecture).

Crossrefs

Cf. A010051, A000040, A051035 (composites).
Equivalent sequence for prime powers: A071331.
Numbers that can be expressed as the sum of two primes in k ways for k=0..10: this sequence (k=0), A067187 (k=1), A067188 (k=2), A067189 (k=3), A067190 (k=4), A067191 (k=5), A066722 (k=6), A352229 (k=7), A352230 (k=8), A352231 (k=9), A352233 (k=10).

Programs

  • Haskell
    a014092 n = a014092_list !! (n-1)
    a014092_list = filter (\x ->
       all ((== 0) . a010051) $ map (x -) $ takeWhile (< x) a000040_list) [1..]
    -- Reinhard Zumkeller, Sep 28 2011
    
  • Maple
    g:=sum(sum(x^(ithprime(i)+ithprime(j)),i=1..j),j=1..50): gser:=series(g,x=0,230): a:=proc(n) if coeff(gser,x^n)=0 then n else fi end: seq(a(n),n=1..225); # Emeric Deutsch, Apr 03 2006
  • Mathematica
    s1falsifiziertQ[s_]:= Module[{ip=IntegerPartitions[s, {2}], widerlegt=False},Do[If[PrimeQ[ip[[i,1]] ] ~And~ PrimeQ[ip[[i,2]] ], widerlegt = True; Break[]],{i,1,Length[ip]}];widerlegt]; Select[Range[250],s1falsifiziertQ[ # ]==False&] (* Michael Taktikos, Dec 30 2007 *)
    Join[{1,2},Select[Range[3,300,2],!PrimeQ[#-2]&]] (* Zak Seidov, Nov 27 2010 *)
    Select[Range[250],Count[IntegerPartitions[#,{2}],?(AllTrue[#,PrimeQ]&)]==0&] (* _Harvey P. Dale, Jun 08 2022 *)
  • PARI
    isA014092(n)=local(p,i) ; i=1 ; p=prime(i); while(pA014092(a), print(n," ",a); n++)) \\ R. J. Mathar, Aug 20 2006
    
  • Python
    from sympy import prime, isprime
    def ok(n):
        i=1
        x=prime(i)
        while xIndranil Ghosh, Apr 29 2017

Formula

Odd composite numbers + 2 (essentially A014076(n) + 2 ).
Equals {2} union A005408 \ A052147, i.e., essentially the complement of A052147 (or rather A048974) within the odd numbers A005408. - M. F. Hasler, Sep 18 2012

A071330 Number of decompositions of n into sum of two prime powers.

Original entry on oeis.org

0, 1, 1, 2, 2, 3, 2, 3, 3, 4, 3, 4, 3, 4, 3, 4, 3, 5, 3, 5, 4, 4, 2, 5, 3, 5, 4, 5, 3, 6, 3, 7, 5, 7, 4, 7, 2, 6, 4, 6, 3, 6, 3, 6, 5, 6, 2, 8, 3, 8, 4, 6, 2, 9, 3, 7, 4, 6, 2, 8, 3, 7, 4, 7, 3, 9, 2, 8, 5, 7, 2, 10, 3, 8, 6, 7, 3, 9, 2, 9, 4, 7, 4, 11, 3, 9, 4, 7, 3, 12, 4, 8, 3, 7, 2
Offset: 1

Views

Author

Reinhard Zumkeller, May 19 2002

Keywords

Comments

a(2*n) > 0 (Goldbach's conjecture).
a(A071331(n)) = 0; A095840(n) = a(A000961(n)).

Examples

			10 = 1 + 3^2 = 2 + 2^3 = 3 + 7 = 5 + 5, therefore a(10) = 4;
11 = 2 + 3^2 = 3 + 2^3 = 4 + 7, therefore a(11) = 3;
12 = 1 + 11 = 3 + 3^2 = 2^2 + 2^3 = 5 + 7, therefore a(12) = 4;
a(149)=0, as for all x<149: if x is a prime power then 149-x is not.
		

Crossrefs

Programs

  • Haskell
    a071330 n = sum $
       map (a010055 . (n -)) $ takeWhile (<= n `div` 2) a000961_list
    -- Reinhard Zumkeller, Jan 11 2013
  • Mathematica
    primePowerQ[n_] := Length[ FactorInteger[n]] == 1; a[n_] := (r = 0; Do[ If[ primePowerQ[k] && primePowerQ[n-k], r++], {k, 1, Floor[n/2]}]; r); Table[a[n], {n, 1, 95}](* Jean-François Alcover, Nov 17 2011, after Michael B. Porter *)
  • PARI
    ispp(n) = (omega(n)==1 || n==1)
    A071330(n) = {local(r);r=0;for(i=1,floor(n/2),if(ispp(i) && ispp(n-i),r++));r} \\ Michael B. Porter, Dec 04 2009
    
  • PARI
    a(n)=my(s); forprime(p=2,n\2,if(isprimepower(n-p), s++)); for(e=2,log(n)\log(2), forprime(p=2, sqrtnint(n\2,e), if(isprimepower(n-p^e), s++))); s+(!!isprimepower(n-1))+(n==2) \\ Charles R Greathouse IV, Nov 21 2014
    

A282062 Expansion of (x + Sum_{p prime, k>=1} x^(p^k))^2.

Original entry on oeis.org

0, 0, 1, 2, 3, 4, 5, 4, 5, 6, 7, 6, 8, 6, 7, 6, 7, 6, 9, 6, 10, 8, 7, 4, 10, 6, 9, 8, 10, 6, 12, 6, 13, 10, 13, 8, 14, 4, 11, 8, 12, 6, 12, 6, 12, 10, 11, 4, 16, 6, 15, 8, 12, 4, 17, 6, 14, 8, 11, 4, 16, 6, 13, 8, 13, 6, 18, 4, 16, 10, 14, 4, 20, 6, 15, 12, 14, 6, 18, 4, 18, 8, 13, 8, 22, 6, 17, 8, 14, 6, 24, 8, 16, 6, 13, 4
Offset: 0

Views

Author

Ilya Gutkovskiy, Feb 05 2017

Keywords

Comments

Number of ways to write n as an ordered sum of two prime powers (1 included).

Examples

			a(8) = 5 because we have  [7, 1], [5, 3], [4, 4], [3, 5] and [1, 7].
		

Crossrefs

Programs

  • Maple
    N:= 100: # to get a(0)..a(N)
    P:= select(isprime, [$2..N]):
    g:= x + add(add(x^(p^k),k=1..floor(log[p](N))),p=P):
    S:= series(g^2,x,N+1):
    seq(coeff(S,x,n),n=0..N); # Robert Israel, Feb 10 2017
  • Mathematica
    nmax = 95; CoefficientList[Series[(x + Sum[Floor[1/PrimeNu[k]] x^k, {k, 2, nmax}])^2, {x, 0, nmax}], x]

Formula

G.f.: (x + Sum_{p prime, k>=1} x^(p^k))^2.

A144313 Prime numbers p such that p - 1 is the fourth a-figurate number, seventh b-figurate number and possibly tenth c-figurate number for some a, b and c and not a d-figurate number for any nontrivial d.

Original entry on oeis.org

29, 71, 113, 239, 281, 449, 491, 659, 701, 827, 911, 953, 1373, 1499, 1583, 1667, 1709, 1877, 2003, 2087, 2129, 2213, 2339, 2423, 2549, 2591, 2633, 2801, 2843, 2969, 3221, 3347, 3389, 3557, 3767, 3851, 4229, 4271, 4397, 4481, 4649, 4691, 4733, 5153, 5279
Offset: 1

Views

Author

Reikku Kulon, Sep 17 2008

Keywords

Comments

Appears to be necessarily a subset of A007528.
The 46th Mersenne prime exponent (Mpe, A000043) 43112609 is a member: 43112608 is the fourth 7185436-figurate number and the seventh 2052983-figurate number and is not a k-figurate number for any other k except 43112608 (trivially). Several other Mersenne prime exponents are members of this sequence.
It is conjectured:
- that this sequence is infinite;
- that there is a unique set {4, 7, 10, 16, ...} (A138694?) giving the possible orders in k-figurate numbers for the set S of all Mpe for which Mpe - 1 is a (4, 7) or (4, 10) k-figurate number;
- that the ratio of Mpe in this sequence to those not approaches a nonzero value;
- that a characteristic function f(n) exists which equals 1 iff n is in S.
Contribution from Reikku Kulon, Sep 18 2008: (Start)
Subset of the integers n such that n is congruent to 29 modulo 42. The case where p - 1 is a tenth c-figurate number occurs when p is also congruent to 281 modulo 630.
The first three primes where c is defined are 281, 911 and 2801, with c = 8, 22, 64; c is congruent to 8 modulo 14. All such primes are necessarily congruent to 1 modulo 10.
The first invalid values of c are 36 and 50, which correspond to the semiprimes 1541 = 23 * 67 and 2171 = 13 * 167. Both of these are members of A071331 and A098237. The next invalid value of c, 78, corresponds to 3431 = 47 * 73, once again a member of both sequences.
The first primes where a, b, c and d are all defined (which therefore excludes them from this sequence) are the consecutive 6581, 7211 and 7841, all members of A140856, A140732, A142076, A142317 and A142905. (End)

Crossrefs

Contribution from Reikku Kulon, Sep 18 2008: (Start)
Cf. A071331, A098237 (semiprimes)
Cf. A140856, A140732, A142076, A142317, A142905 (a, b, c and d all defined) (End)

A095842 Prime powers having no partition into two prime powers.

Original entry on oeis.org

1, 149, 331, 373, 509, 701, 757, 809, 877, 907, 997, 1019, 1087, 1259, 1549, 1597, 1619, 1657, 1759, 1777, 1783, 1867, 1973, 2293, 2377, 2503, 2579, 2683, 2789, 2843, 2879, 2909, 2999, 3119, 3163, 3181, 3187, 3299, 3343, 3433, 3539, 3643
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 10 2004

Keywords

Comments

A095840(A095874(a(n))) = 0.
A071330(a(n)) = 0.
Here, "prime powers" is used in the relaxed sense, including 1. The numbers 96721, 121801, 192721, 205379, 226981,... seem to be the smallest composite terms of this sequence, which establishes the difference with the subsequence A115231. - M. F. Hasler, Nov 20 2014

Crossrefs

Subsequence of A071331.

Programs

  • Haskell
    a095842 n = a095842_list !! (n-1)
    a095842_list = filter ((== 0) . a071330) a000961_list
    -- Reinhard Zumkeller, Jan 11 2013
  • PARI
    isprimepower(n)=ispower(n,,&n);isprime(n)||n==1;
    isA095842(n)=if(!isprimepower(n),return(0));forprime(p=2,n\2,if(isprimepower(n-p),return(0)));forprime(p=2,sqrtint(n\2),for(e=1,log(n\2)\log(p),if(isprimepower(n-p^e),return(0))));!isprimepower(n-1)
    \\ Charles R Greathouse IV, Jul 06 2011
    

A280242 Expansion of (Sum_{k>=2} floor(1/omega(k))*x^k)^2, where omega(k) is the number of distinct prime factors (A001221).

Original entry on oeis.org

0, 0, 0, 0, 1, 2, 3, 4, 3, 4, 5, 6, 6, 6, 5, 6, 7, 4, 7, 6, 8, 8, 7, 4, 8, 6, 7, 8, 8, 6, 10, 6, 11, 8, 13, 8, 14, 4, 9, 8, 12, 6, 10, 6, 10, 10, 11, 4, 14, 6, 13, 8, 12, 4, 15, 6, 14, 8, 11, 4, 14, 6, 11, 8, 13, 4, 18, 4, 14, 10, 14, 4, 18, 6, 13, 12, 14, 6, 18, 4, 16, 8, 11, 8, 20, 6, 17, 8, 14, 6, 22, 8, 16, 6, 13, 4, 20, 4
Offset: 0

Views

Author

Ilya Gutkovskiy, Dec 29 2016

Keywords

Comments

Number of ordered ways of writing n as the sum of two prime powers (1 excluded).

Examples

			a(6) = 3 because we have [4, 2], [3, 3] and [2, 4].
		

Crossrefs

Programs

  • Mathematica
    nmax = 97; CoefficientList[Series[(Sum[Floor[1/PrimeNu[k]] x^k, {k, 2, nmax}])^2, {x, 0, nmax}], x]

Formula

G.f.: (Sum_{k>=2} floor(1/omega(k))*x^k)^2.

A307726 Number of partitions of n into 2 prime powers (not including 1).

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 2, 4, 3, 4, 4, 4, 2, 4, 3, 4, 4, 4, 3, 5, 3, 6, 4, 7, 4, 7, 2, 5, 4, 6, 3, 5, 3, 5, 5, 6, 2, 7, 3, 7, 4, 6, 2, 8, 3, 7, 4, 6, 2, 7, 3, 6, 4, 7, 2, 9, 2, 7, 5, 7, 2, 9, 3, 7, 6, 7, 3, 9, 2, 8, 4, 6, 4, 10, 3, 9, 4, 7, 3, 11, 4, 8, 3, 7, 2, 10, 2, 8, 3, 8
Offset: 0

Views

Author

Ilya Gutkovskiy, Apr 24 2019

Keywords

Examples

			a(10) = 3 because we have [8, 2], [7, 3] and [5, 5].
		

Crossrefs

Programs

  • Maple
    # note that this requires A246655 to be pre-computed
    f:= proc(n, k, pmax) option remember;
      local t, p, j;
      if n = 0 then return `if`(k=0, 1, 0) fi;
      if k = 0 then return 0 fi;
      if n > k*pmax then return 0 fi;
      t:= 0:
      for p in A246655 do
        if p > pmax then return t fi;
        t:= t + add(procname(n-j*p, k-j, min(p-1, n-j*p)), j=1..min(k, floor(n/p)))
      od;
      t
    end proc:
    map(f, [$0..100]); # Robert Israel, Apr 29 2019
  • Mathematica
    Array[Count[IntegerPartitions[#, {2}], _?(AllTrue[#, PrimePowerQ] &)] &, 101, 0]

Formula

a(n) = [x^n y^2] Product_{k>=1} 1/(1 - y*x^A246655(k)).

A109829 Number of distinct prime factors of 149 - (n-th prime power less than 149).

Original entry on oeis.org

2, 2, 2, 2, 2, 2, 2, 3, 3, 2, 2, 3, 3, 3, 2, 2, 3, 2, 2, 2, 2, 2, 3, 2, 2, 3, 2, 2, 2, 3, 2, 3, 2, 3, 3, 2, 2, 2, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Reinhard Zumkeller, Jul 04 2005

Keywords

Comments

a(n) > 1: A071331(2) = 149, A071330(149) = 0.

Programs

  • Mathematica
    Join[{2},PrimeNu/@(149-Select[Range[0,148],PrimePowerQ])] (* Harvey P. Dale, Jan 27 2019 *)

Formula

a(n) = 149 - A000961(n) for n <= 48.

A290135 Numbers that are the sum of two proper prime powers (A246547).

Original entry on oeis.org

8, 12, 13, 16, 17, 18, 20, 24, 25, 29, 31, 32, 33, 34, 35, 36, 40, 41, 43, 48, 50, 52, 53, 54, 57, 58, 59, 64, 65, 68, 72, 73, 74, 76, 80, 81, 85, 89, 90, 91, 96, 97, 98, 106, 108, 113, 125, 128, 129, 130, 132, 133, 134, 136, 137, 141, 144, 145, 146, 148, 150, 152, 153, 155, 157, 160, 162, 170, 173, 174, 177, 178
Offset: 1

Views

Author

Ilya Gutkovskiy, Jul 20 2017

Keywords

Comments

Is 2213 the largest prime term that can be expressed as the sum of two proper prime powers in more than one way? - Altug Alkan, Jul 22 2017

Examples

			13 is in the sequence because 13 = 2^2 + 3^2.
		

Crossrefs

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    P:= select(isprime, [$2..floor(sqrt(N))]):
    PP:= {seq(seq(p^j, j=2..floor(log[p](N))),p=P)}:
    A:= select(`<=`,{seq(seq(PP[i]+PP[j],j=1..i),i=1..nops(PP))},N):
    sort(convert(A,list)); # Robert Israel, Jul 21 2017
  • Mathematica
    nmax = 180; f[x_] := Sum[Boole[PrimePowerQ[k] && PrimeOmega[k] > 1] x^k, {k, 1, nmax}]^2; Exponent[#, x] & /@ List @@ Normal[Series[f[x], {x, 0, nmax}]]

Formula

Exponents in expansion of (Sum_{k>=1} x^A246547(k))^2.

A290136 Positive numbers that are not the sum of two nonprime squarefree numbers (A000469).

Original entry on oeis.org

1, 3, 4, 5, 6, 8, 9, 10, 13, 14, 17, 18, 19, 26, 33, 38, 46, 62, 82
Offset: 1

Views

Author

Ilya Gutkovskiy, Jul 20 2017

Keywords

Comments

The sequence is conjectured to be complete.

Crossrefs

Programs

  • Mathematica
    nmax = 82; f[x_] := Sum[Boole[SquareFreeQ[k] && PrimeNu[k] != 1] x^k, {k, 1, nmax}]^2; b = Exponent[#, x] & /@ List @@ Normal[Series[f[x], {x, 0, nmax}]]; c = Complement[Range[nmax], b][[1 ;; 19]]
Showing 1-10 of 10 results.