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.

Previous Showing 31-38 of 38 results.

A175613 Number of semiprimes <= 2^prime(n).

Original entry on oeis.org

1, 2, 10, 42, 589, 2186, 30253, 113307, 1608668, 88157689, 336717854, 19015826478, 282528883551, 1091574618496, 16360940729894
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Dec 04 2010

Keywords

Examples

			a(2)=2 because first 2 semiprimes are 4, 6 both <2^prime(2)=8.
		

Crossrefs

Cf. A001358, A007053, a proper subset of A125527.

Programs

  • Mathematica
    (* First run program given in A072000 to define the SemiPrimePi function *) Table[SemiPrimePi[2^Prime[n]], {n, 10}](* Alonso del Arte, Dec 10 2010 *)
  • PARI
    a(n)=my(N=2^prime(n),s,i); forprime(p=2, sqrtint(N), s+=primepi(N\p); i++); s - i * (i-1)/2 \\ Charles R Greathouse IV, Apr 25 2016
    
  • Python
    from math import isqrt
    from sympy import prime, primepi
    def A175613(n):
        m = 1<Chai Wah Wu, Jul 23 2024

Formula

a(n) = A072000(A034785(n)) = A125527(A000040(n)). - R. J. Mathar, Dec 10 2010

Extensions

a(14) & a(15) from Robert G. Wilson v, Oct 19 2011.

A225533 Numbers expressible as p^2 + 2^q where p and q are primes.

Original entry on oeis.org

8, 12, 13, 17, 29, 33, 36, 41, 53, 57, 81, 125, 129, 132, 137, 153, 173, 177, 201, 249, 293, 297, 321, 365, 369, 393, 417, 489, 533, 537, 561, 657, 845, 849, 873, 965, 969, 993, 1089, 1373, 1377, 1401, 1497, 1685, 1689, 1713, 1809, 1853, 1857, 1881, 1977, 2052
Offset: 1

Views

Author

Keywords

Comments

a(n) ~ n^2. For n > 468, the formula .358*n^2.085 provides an estimate of a(n) accurate to within 11%.
a(10) = 57 is the first term that meets the criterion in two ways (5^2 + 2^5 and 7^2 + 2^3). In the first 10000 terms, there are 30 terms expressible in two ways, but none expressible in three ways.

Examples

			29 = 5^2 + 2^2, and both 5 and 2 are prime.
		

Crossrefs

Programs

  • Mathematica
    nn = 15; ps = Prime[Range[nn]]; p2 = Prime[Range[PrimePi[2*Log[2, ps[[-1]]]]]]; t = Table[p^2 + 2^q, {p, ps}, {q, p2}]; Union[Select[Flatten[t], # < ps[[-1]]^2 &]] (* T. D. Noe, May 15 2013 *)
  • R
    library(gmp); x=y=as.bigz(2); maxval=10000; sol=as.bigz(matrix(0,nc=3,nr=1000)); len=0
    while(len<1000 & x^2+2^y
    				

A243139 a(n) = 2^prime(n) + prime(n).

Original entry on oeis.org

6, 11, 37, 135, 2059, 8205, 131089, 524307, 8388631, 536870941, 2147483679, 137438953509, 2199023255593, 8796093022251, 140737488355375, 9007199254741045, 576460752303423547, 2305843009213694013, 147573952589676412995, 2361183241434822606919
Offset: 1

Views

Author

Vincenzo Librandi, Jun 03 2014

Keywords

Crossrefs

Programs

  • Magma
    [2^p + p: p in PrimesUpTo(80)];
  • Mathematica
    f[n_]:=(2^Prime[n] + Prime[n]); Array[f, 80, 1]

A280609 Odd prime powers with prime exponents.

Original entry on oeis.org

9, 25, 27, 49, 121, 125, 169, 243, 289, 343, 361, 529, 841, 961, 1331, 1369, 1681, 1849, 2187, 2197, 2209, 2809, 3125, 3481, 3721, 4489, 4913, 5041, 5329, 6241, 6859, 6889, 7921, 9409, 10201, 10609, 11449, 11881, 12167, 12769, 16129, 16807, 17161, 18769, 19321, 22201, 22801, 24389, 24649, 26569, 27889, 29791, 29929
Offset: 1

Views

Author

Ilya Gutkovskiy, Jan 06 2017

Keywords

Comments

Intersection of A053810 and A061345.

Examples

			9 is in the sequence because 9 = 3^2;
25 is in the sequence because 25 = 5^2;
27 is in the sequence because 27 = 3^3, etc.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[30000], PrimePowerQ[#1] && PrimeQ[PrimeOmega[#1]] && Mod[#1, 2] == 1 & ]
  • Python
    from sympy import primepi, integer_nthroot, primerange
    def A280609(n):
        def f(x): return int(n+x-sum(primepi(integer_nthroot(x, p)[0])-1 for p in primerange(x.bit_length())))
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        return bisection(f,n,n) # Chai Wah Wu, Sep 12 2024

Formula

a(n) = p^q, where p, q are primes and p > 2.
Sum_{n>=1} 1/a(n) = Sum_{p prime} P(p) - A051006 = 0.25699271237062131298..., where P(s) is the prime zeta function. - Amiram Eldar, Sep 13 2024

A319233 Numbers k such that k^2 + 1 divides 2^k + 4.

Original entry on oeis.org

0, 1, 8, 28, 32, 128, 2048, 8192, 23948, 131072, 524288, 8388608, 536870912, 2147483648, 137438953472
Offset: 1

Views

Author

Altug Alkan, Sep 14 2018

Keywords

Comments

This sequence corresponds to numbers k such that k^2 + 1 divides 2^k + 2^m where m = 2 (A247220 (m = 0), A319216 (m = 1)).
a(16) > 10^12. - Hiroaki Yamanouchi, Sep 17 2018

Examples

			32 = 2^5 is a term since (2^(2^5) + 2^2)/((2^5)^2 + 1) = 2^22 - 2^12 + 2^2.
		

Crossrefs

Programs

  • PARI
    isok(n)=Mod(2, n^2+1)^n==-4;

Extensions

a(15) from Hiroaki Yamanouchi, Sep 17 2018

A333392 a(0) = 1; thereafter a(n) = 2^(prime(n)-1) + Sum_{k=1..n} 2^(prime(n)-prime(k)).

Original entry on oeis.org

1, 3, 7, 29, 117, 1873, 7493, 119889, 479557, 7672913, 491066433, 1964265733, 125713006913, 2011408110609, 8045632442437, 128730119078993, 8238727621055553, 527278567747555393, 2109114270990221573, 134983313343374180673, 2159733013493986890769, 8638932053975947563077
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 18 2020

Keywords

Examples

			a(7) = 119889 (in base 10) = 11101010001010001 (in base 2).
                             ||| | |   | |   |
                             123 5 7  1113  17
		

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[n_] := 2^(Prime[n] - 1) + Sum[2^(Prime[n] - Prime[k]), {k, 1, n}]; Table[a[n], {n, 0, 21}]
  • PARI
    a(n) = if (n==0, 1, 2^(prime(n)-1) + sum(k=1, n, 2^(prime(n)-prime(k)))); \\ Michel Marcus, Mar 18 2020

Formula

a(n) = floor(c * 2^prime(n)) for n > 0, where c = 0.91468250985... = 1/2 + A051006.

A272260 Numbers that cause an infinite loop in Conway's PRIMEGAME.

Original entry on oeis.org

1, 5, 7, 11, 13, 17, 19, 22, 25, 26, 29, 31, 33, 35, 37, 39, 41, 43, 44, 47, 49, 51, 52, 53, 55, 57, 59, 61
Offset: 1

Views

Author

Alonso del Arte, Apr 23 2016

Keywords

Comments

The following values are certainly in the sequence: 65, 67, 71, 73, 77, 79, 83, 87, 88, 89, 91, 97, 99, 101. The following values are doubtful: 62, 74, 82, 86, 93, 94.
Conway's PRIMEGAME (also called "Conway's prime producing machine") is a fascinating (and very inefficient) method for obtaining the prime numbers.
The "machine" takes in a number, and tries multiplying it by each of fourteen fractions one by one to find the first one that produces an integer. Then that integer is multiplied by each of the fourteen fractions one by one to find the first one that produces another integer. The goal is to find powers of 2; these powers of 2 have a binary logarithm that is a prime number.
The fractions of Conway's PRIMEGAME are 17/91, 78/85, 19/51, 23/38, 29/33, 77/29, 95/23, 77/19, 1/17, 11/13, 13/11, 15/2, 1/7, 55.
The "machine" was designed to take 2 as its first input, which gives us the sequence A007542, and from that sequence we can pick out the sequence 2^prime(n) (A034785).
But there are other numbers that can be used as a first input. If the process is started with 3, the process eventually leads to 2 (see A185242). So starting with 3 just delays the process.
However, the numbers in this sequence taken as first inputs do much worse than delay the process, they get the program stuck in an endless loop.
A lot, but not all, of the numerators of the Conway fractions are in this sequence. Specifically, all except 78, 23, 95, 15. As for denominators, all of them except 85, 38, 23, 2 are in this sequence.
All prime numbers greater than 29 are in this sequence. Given a prime number p > 29, we see that multiplying by the first thirteen fractions results in a rational but non-integer value, so the process gives 55p for the first step. Then 55p * 13/11 = 65p and 65p * 11/13 = 55p, hence an infinite loop.
In fact, the only primes that can be used to start the process without leading to an infinite loop are 2, 3, 23.

Examples

			5 multiplied by 55 gives 275.
275 multiplied by 13/11 gives 325.
325 multiplied by 11/13 gives 275.
Since 275 has occurred before, this means that 5 leads the process to get stuck on bouncing between 275 and 325, and so 5 is in this sequence.
		

Crossrefs

Cf. A203907.

A289898 a(n) = floor((2^prime(n+1))/Sum_{k=0|n,2^prime(k)}).

Original entry on oeis.org

2, 2, 2, 11, 3, 12, 3, 12, 59, 3, 51, 15, 3, 12, 59, 62, 3, 51, 15, 3, 50, 15, 60, 251, 15, 3, 12, 3, 12, 15179, 15, 60, 3, 816, 3, 51, 62, 15, 60, 62, 3, 816, 3, 12, 3, 3226, 4094, 15, 3, 12, 59, 3, 816, 63, 63, 63, 3, 51, 15, 3, 808, 16363, 15, 3, 12, 15183
Offset: 1

Views

Author

Joseph Wheat, Jul 14 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Floor[2^Prime[n + 1]/Sum[ 2^Prime[k], {k, n}]], {n, 66}] (* Michael De Vlieger, Jul 16 2017 *)
  • PARI
    a(n) = 2^prime(n+1)\sum(k=1, n, 2^prime(k)); \\ Michel Marcus, Jul 16 2017

Formula

a(n) = floor(2^prime(n+1)/(Sum_{k=1..n} 2^prime(k))).
Previous Showing 31-38 of 38 results.