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

A118955 Numbers of the form 2^k + prime.

Original entry on oeis.org

3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 17, 18, 19, 20, 21, 23, 24, 25, 27, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 43, 44, 45, 47, 48, 49, 51, 53, 54, 55, 57, 59, 60, 61, 62, 63, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 77, 79, 80, 81, 83, 84, 85, 87, 89, 90, 91, 93
Offset: 1

Views

Author

Reinhard Zumkeller, May 07 2006

Keywords

Comments

A109925(a(n)) > 0, complement of A118954;
The lower density is at least 0.09368 (Pintz) and upper density is at most 0.49095 (Habsieger & Roblot). The density, if it exists, is called Romanov's constant. Romani conjectures that it is around 0.434. - Charles R Greathouse IV, Mar 12 2008
Elsholtz & Schlage-Puchta improve the bound on lower density to 0.107648. Unpublished work by Jie Wu improves this to 0.110114, see Remark 1 in Elsholtz & Schlage-Puchta. - Charles R Greathouse IV, Aug 06 2021

References

  • Steven R. Finch, Mathematical Constants, Encyclopedia of Mathematics and its Applications, vol. 94, Cambridge University Press, 2003, Section 2.1, p. 87.

Crossrefs

Subsequence of A081311; A118957 is a subsequence.

Programs

  • Haskell
    a118955 n = a118955_list !! (n-1)
    a118955_list = filter f [1..] where
       f x = any (== 1) $ map (a010051 . (x -)) $ takeWhile (< x) a000079_list
    -- Reinhard Zumkeller, Jan 03 2014
    
  • Mathematica
    Select[Range[100], (For[r=False; k=1, #>k, k*=2, If[PrimeQ[#-k], r=True]]; r)& ] (* Jean-François Alcover, Dec 26 2013, after Charles R Greathouse IV *)
  • PARI
    is(n)=my(k=1);while(n>k,if(isprime(n-k),return(1),k*=2));0 \\ Charles R Greathouse IV, Mar 12 2008
    
  • PARI
    list(lim)=my(v=List(),t=1); while(tCharles R Greathouse IV, Aug 06 2021
    
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A118955_gen(startvalue=1): # generator of terms >= startvalue
        return filter(lambda n: any(isprime(n-(1<A118955_list = list(islice(A118955_gen(),30)) # Chai Wah Wu, Nov 29 2023

A081308 Number of ways to write n as sum of a prime and an 3-smooth number.

Original entry on oeis.org

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

Views

Author

Reinhard Zumkeller, Mar 17 2003

Keywords

Comments

Asymptotically, for n coprime to 6, a(n) ~ C*n on the average, with C=3/(2*log(2)*log(3))~1.969796..., see the link. - M. F. Hasler, Oct 21 2011
a(A081310(n)) = 0; a(A081311(n)) > 0; a(A081312(n)) = 1; a(A081313(n)) > 1.

Examples

			a(12)=2: 12=11+1=3+3^2; a(13)=3: 13=11+2=7+2*3=5+2^3.
		

Crossrefs

Programs

  • Haskell
    a081308 n = sum $ map (a010051' . (n -)) $ takeWhile (< n) a003586_list
    -- Reinhard Zumkeller, Jul 04 2012
  • Mathematica
    nmax = 1000;
    S = Select[Range[nmax], Max[FactorInteger[#][[All, 1]]] <= 3&];
    a[n_] := Count[TakeWhile[S, #Jean-François Alcover, Oct 13 2021 *)
  • PARI
    A081308(n)=my(L2=log(2));sum(e3=0,log(n+.5)\log(3), sum(e2=0,log(n\3^e3)\L2, isprime(n-(3^e3)<M. F. Hasler, Oct 21 2011
    

A081310 Numbers having no representation as sum of a prime and an 3-smooth number.

Original entry on oeis.org

1, 2, 36, 78, 96, 120, 126, 144, 156, 162, 186, 204, 210, 216, 222, 276, 288, 300, 306, 324, 328, 330, 336, 342, 366, 372, 378, 396, 408, 414, 426, 438, 456, 474, 486, 498, 516, 528, 534, 540, 546, 552, 562, 576, 582, 606, 612, 624, 630, 636, 666, 672, 690
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 17 2003

Keywords

Comments

Complement of A081311.

Examples

			For all primes p<36 the greatest prime factor of 36-p is >3: 36-2=2*17, 36-3=3*11, 36-5=31, 36-7=29, 36-11=5*5, 36-13=23, 36-17=19, 36-19=17, 36-23=13, 36-29=7, 36-31=5, therefore 36 is a term.
		

Crossrefs

Programs

  • Haskell
    a081310 n = a081310_list !! (n-1)
    a081310_list = filter ((== 0) . a081308) [1..]
    -- Reinhard Zumkeller, Jul 04 2012
  • Mathematica
    nmax = 1000;
    S = Select[Range[nmax], Max[FactorInteger[#][[All, 1]]] <= 3 &];
    A081308[n_] := Count[TakeWhile[S, # < n &], s_ /; PrimeQ[n - s]];
    Select[Range[nmax], A081308[#] == 0 &] (* Jean-François Alcover, Oct 13 2021 *)

Formula

A081308(a(n)) = 0.

A081312 Numbers having a unique representation as sum of a prime and an 3-smooth number.

Original entry on oeis.org

3, 24, 28, 42, 48, 52, 54, 58, 60, 66, 72, 90, 102, 108, 114, 132, 138, 150, 168, 172, 174, 180, 192, 196, 198, 214, 228, 234, 240, 246, 252, 264, 268, 270, 282, 294, 298, 312, 318, 348, 354, 360, 384, 390, 402, 404, 420, 432, 444, 450, 462, 468, 478, 480, 492
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 17 2003

Keywords

Crossrefs

Subsequence of A081311.

Programs

  • Haskell
    a081312 n = a081312_list !! (n-1)
    a081312_list = filter ((== 1) . a081308) [1..]
    -- Reinhard Zumkeller, Jul 04 2012
  • Mathematica
    sp3sQ[n_]:=Length[Select[IntegerPartitions[n,{2}],(PrimeQ[#[[1]]]&&Max[ FactorInteger[#[[2]]][[All,1]]]<4)||(PrimeQ[#[[2]]]&&Max[ FactorInteger[ #[[1]]][[All,1]]]<4)&]]==1; Select[Range[500],sp3sQ]/.(5->Nothing) (* Harvey P. Dale, Feb 05 2019 *)
    nmax = 1000;
    S = Select[Range[nmax], Max[FactorInteger[#][[All, 1]]] <= 3 &];
    A081308[n_] := Count[TakeWhile[S, # < n &], s_ /; PrimeQ[n - s]];
    Select[Range[nmax], A081308[#] == 1 &] (* Jean-François Alcover, Oct 13 2021 *)

Formula

A081308(a(n)) = 1.

A081313 Numbers having more than one representation as sum of a prime and a 3-smooth number.

Original entry on oeis.org

4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 25, 26, 27, 29, 30, 31, 32, 33, 34, 35, 37, 38, 39, 40, 41, 43, 44, 45, 46, 47, 49, 50, 51, 53, 55, 56, 57, 59, 61, 62, 63, 64, 65, 67, 68, 69, 70, 71, 73, 74, 75, 76, 77, 79, 80, 81, 82, 83, 84, 85, 86
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 17 2003

Keywords

Crossrefs

Subsequence of A081311.

Programs

  • Haskell
    a081313 n = a081313_list !! (n-1)
    a081313_list = filter ((> 1) . a081308) [1..]
    -- Reinhard Zumkeller, Jul 04 2012
  • Mathematica
    nmax = 1000;
    S = Select[Range[nmax], Max[FactorInteger[#][[All, 1]]] <= 3 &];
    A081308[n_] := Count[TakeWhile[S, # < n &], s_ /; PrimeQ[n - s]];
    Select[Range[nmax], A081308[#] > 1 &] (* Jean-François Alcover, Oct 13 2021 *)

Formula

A081308(a(n)) > 1.

A081309 Smallest prime p such that n-p is a 3-smooth number, a(n)=0 if no such prime exists.

Original entry on oeis.org

0, 0, 2, 2, 2, 2, 3, 2, 3, 2, 2, 3, 5, 2, 3, 7, 5, 2, 3, 2, 3, 13, 5, 23, 7, 2, 3, 19, 2, 3, 7, 5, 17, 2, 3, 0, 5, 2, 3, 13, 5, 41, 7, 17, 13, 19, 11, 47, 13, 2, 3, 43, 5, 53, 7, 2, 3, 31, 5, 59, 7, 53, 31, 37, 11, 2, 3, 41, 5, 43, 7, 71, 19, 2, 3, 67, 5, 0, 7, 53, 17, 73, 2, 3, 13, 5, 23, 7, 17, 89
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 17 2003

Keywords

Examples

			a(25)=7: 25=7+2*3^2.
		

Crossrefs

Programs

  • Haskell
    a081309 n | null ps   = 0
              | otherwise = head ps
              where ps = [p | p <- takeWhile (< n) a000040_list,
                              a065333 (n - p) == 1]
    -- Reinhard Zumkeller, Jul 04 2012
  • Mathematica
    smooth3Q[n_] := n/2^IntegerExponent[n, 2]/3^IntegerExponent[n, 3] == 1;
    a[n_] := Module[{p}, For[p = 2, p < n, p = NextPrime[p], If[smooth3Q[n - p], Return[p]]]; 0];
    Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 14 2021 *)

Formula

a(n)=0 iff A081308(n)=0.
Showing 1-6 of 6 results.