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 21-30 of 118 results. Next

A120035 Number of 4-almost primes f such that 2^n < f <= 2^(n+1).

Original entry on oeis.org

0, 0, 0, 1, 1, 5, 7, 20, 37, 81, 173, 344, 736, 1461, 3065, 6208, 12643, 25662, 52014, 105487, 212566, 430007, 865650, 1744136, 3508335, 7053390, 14167804, 28441899, 57065447, 114418462, 229341261, 459442819, 920097130, 1841946718, 3686197728
Offset: 0

Views

Author

Keywords

Comments

The partial sum equals the number of Pi_4(2^n) = A334069(n).

Examples

			(2^4, 2^5] there is one semiprime, namely 24. 16 was counted in the previous entry.
		

Crossrefs

Programs

  • Mathematica
    FourAlmostPrimePi[n_] := Sum[ PrimePi[n/(Prime@i*Prime@j*Prime@k)] - k + 1, {i, PrimePi[n^(1/4)]}, {j, i, PrimePi[(n/Prime@i)^(1/3)]}, {k, j, PrimePi@Sqrt[n/(Prime@i*Prime@j)]}]; t = Table[ FourAlmostPrimePi[2^n], {n, 0, 37}]; Rest@t - Most@t
  • Python
    from math import isqrt
    from sympy import primepi, primerange, integer_nthroot
    def A120035(n):
        x = 1<Chai Wah Wu, Mar 28 2025

A095759 Triangle T(row>=0, 0<= pos <=row) by rows: T(r,p) contains number of odd primes p in range [2^(r+1),2^(r+2)] for which A037888(p)=pos.

Original entry on oeis.org

1, 2, 0, 0, 2, 0, 2, 3, 0, 0, 0, 5, 2, 0, 0, 3, 4, 6, 0, 0, 0, 0, 15, 4, 4, 0, 0, 0, 3, 18, 15, 7, 0, 0, 0, 0, 0, 32, 20, 16, 7, 0, 0, 0, 0, 7, 33, 63, 24, 10, 0, 0, 0, 0, 0, 0, 63, 62, 88, 33, 9, 0, 0, 0, 0, 0, 12, 81, 135, 154, 56, 26, 0, 0, 0, 0, 0, 0, 0, 119, 150, 314, 197, 72, 20, 0, 0, 0, 0, 0, 0
Offset: 0

Views

Author

Antti Karttunen, Jun 12 2004

Keywords

Examples

			a(0) = T(0,0) = 1 as there is one prime 3 (11 in binary) in range ]2^1,2^2[ whose binary expansion is palindromic. a(1) = T(1,0) = 2 as there are two primes, 5 and 7 (101 and 111 in binary) in range ]2^2,2^3[ whose binary expansions are palindromic. a(2) = T(1,1) = 0, as there are no other primes in that range. a(3) = T(2,0) = 0, as there are no palindromic primes in range ]2^3,2^4[, but a(4) = T(2,1) = 2 as in the same range there are two primes 11 and 13 (1011 and 1101 in binary), whose binary expansion needs a flip of just one bit to become palindrome.
		

Crossrefs

Row sums: A036378. Bisection of the leftmost diagonal: A095741. Next diagonals: A095753, A095754, A095755, A095756. Central diagonal (column): A095760. The rightmost nonzero terms from each row: A095757 (i.e. central diagonal and next-to-central diagonal interleaved). The penultimate nonzero terms from each row: A095758. Cf. also A095749, A048700-A048704, A095742.

A162145 a(n) = the number of noncomposites (primes or 1) that are n digits long when written in binary.

Original entry on oeis.org

1, 2, 2, 2, 5, 7, 13, 23, 43, 75, 137, 255, 464, 872, 1612, 3030, 5709, 10749, 20390, 38635, 73586, 140336, 268216, 513708, 985818, 1894120, 3645744, 7027290, 13561907, 26207278, 50697537, 98182656, 190335585, 369323305, 717267168
Offset: 1

Views

Author

Leroy Quet, Jun 25 2009

Keywords

Examples

			The consecutive primes 17 (10001 in binary), 19 (10011 in binary), 23 (10111 in binary), 29 (11101 in binary), and 31 (11111 in binary) are the only primes each written with exactly 5 digits in binary. There are 5 of these primes, so a(5) = 5.
		

Crossrefs

Cf. A004676.
Same as A036378 except for a(1). - Franklin T. Adams-Watters, May 25 2010

Programs

  • Magma
    [#PrimesInInterval(2^n, 2^(n+1)): n in [0..25]]; // Vincenzo Librandi, Dec 08 2015
  • Mathematica
    Table[PrimePi[2^(d + 1)] - PrimePi[2^d-1], {d, 1, 46}] (*Lei Zhou Dec 17 2013; this is capable of generating terms 1..47 *)
    Join[{1, 2}, t=Table[PrimePi[2^n], {n, 2, 40}]; Rest@t - Most@t] (* Vincenzo Librandi, Dec 08 2015 *)

Formula

a(n) = A036378(n-1), n>2. - R. J. Mathar, Jun 27 2009

Extensions

More terms from Franklin T. Adams-Watters, May 25 2010

A095008 Number of 4k+3 primes (A002145) in range ]2^n,2^(n+1)].

Original entry on oeis.org

1, 1, 1, 3, 3, 7, 13, 22, 37, 71, 128, 231, 440, 807, 1519, 2872, 5371, 10204, 19341, 36759, 70179, 134241, 256856, 492936, 947272, 1822615, 3513691, 6781495, 13103816, 25348667, 49092241, 95168205, 184661253, 358636497, 697094872, 1356052491, 2639893495, 5142817901
Offset: 1

Views

Author

Antti Karttunen and Labos Elemer, Jun 01 2004

Keywords

Crossrefs

Formula

a(n) = A036378(n) - A095007(n) = A095010(n) + A095012(n) = A095092(n) + A095093(n).

Extensions

a(34)-a(38) from Amiram Eldar, Jun 12 2024

A120034 Number of 3-almost primes t such that 2^n < t <= 2^(n+1).

Original entry on oeis.org

0, 0, 1, 1, 5, 6, 17, 30, 65, 131, 257, 536, 1033, 2132, 4187, 8370, 16656, 33123, 65855, 130460, 259431, 513737, 1019223, 2019783, 4003071, 7930375, 15712418, 31126184, 61654062, 122137206, 241920724, 479226157, 949313939, 1880589368, 3725662783
Offset: 0

Views

Author

Keywords

Comments

The partial sum equals the number of Pi_3(2^n) = A127396(n).

Examples

			(2^3, 2^4] there is one semiprime, namely 12. 8 was counted in the previous entry.
		

Crossrefs

Programs

  • Mathematica
    ThreeAlmostPrimePi[n_] := Sum[PrimePi[n/(Prime@i*Prime@j)] - j + 1, {i, PrimePi[n^(1/3)]}, {j, i, PrimePi@Sqrt[n/Prime@i]}]; t = Table[ ThreePrimePi[2^n], {n, 0, 35}]; Rest@t - Most@t

A120036 Number of 5-almost primes 5ap such that 2^n < 5ap <= 2^(n+1).

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 5, 8, 21, 41, 91, 199, 403, 873, 1767, 3740, 7709, 15910, 32759, 67185, 138063, 281566, 576165, 1173435, 2390366, 4860357, 9873071, 20033969, 40612221, 82266433, 166483857, 336713632, 680482316, 1374413154, 2774347425
Offset: 0

Views

Author

Keywords

Comments

The partial sum equals the number of Pi_5(2^n) = 0, 0, 0, 0, 1, 2, 7, 15, 36, 77, 168, 367, 770, 1643,..

Examples

			(2^5, 2^6] there is one semiprime, namely 48. 32 was counted in the previous entry.
		

Crossrefs

Programs

  • Mathematica
    FiveAlmostPrimePi[n_] := Sum[ PrimePi[n/(Prime@i*Prime@j*Prime@k*Prime@l)] - l + 1, {i, PrimePi[n^(1/5)]}, {j, i, PrimePi[(n/Prime@i)^(1/4)]}, {k, j, PrimePi[(n/(Prime@i*Prime@j))^(1/3)]}, {l, k, PrimePi[(n/(Prime@i*Prime@j*Prime@k))^(1/2)]}]; t = Table[ FiveAlmostPrimePi[2^n], {n, 0, 37}]; Rest@t - Most@t

A120037 Number of 6-almost primes 6ap such that 2^n < 6ap <= 2^(n+1).

Original entry on oeis.org

0, 0, 0, 0, 0, 1, 1, 5, 8, 22, 44, 96, 215, 439, 959, 1967, 4185, 8735, 18143, 37695, 77939, 161479, 332008, 684502, 1404867, 2882712, 5904454, 12078654, 24682057, 50375102, 102724466, 209250102, 425921989, 866187909, 1760280404, 3574740094
Offset: 0

Views

Author

Keywords

Comments

The partial sum equals the number of Pi_6(2^n).

Examples

			(2^6, 2^7] there is one semiprime, namely 96. 64 was counted in the previous entry.
		

Crossrefs

Programs

  • Mathematica
    AlmostPrimePi[k_Integer, n_] := Module[{a, i}, a[0] = 1; If[k == 1, PrimePi[n], Sum[PrimePi[n/Times @@ Prime[Array[a, k - 1]]] - a[k - 1] + 1, Evaluate[ Sequence @@ Table[{a[i], a[i - 1], PrimePi[(n/Times @@ Prime[Array[a, i - 1]])^(1/(k - i + 1))]}, {i, k - 1}]]]]]; (* Eric W. Weisstein, Feb 07 2006 *)
    t = Table[AlmostPrimePi[6, 2^n], {n, 0, 30}]; Rest@t - Most@t

A120038 Number of 7-almost primes 7ap such that 2^n < 7ap <= 2^(n+1).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 1, 1, 5, 8, 22, 46, 99, 224, 461, 1013, 2093, 4459, 9388, 19603, 40946, 85087, 177200, 366248, 758686, 1565038, 3226717, 6641105, 13648299, 28018956, 57445770, 117667693, 240751326, 492172466, 1005221914, 2051468099
Offset: 0

Views

Author

Keywords

Comments

The partial sum equals the number of Pi_7(2^n).

Examples

			(2^7, 2^8] there is one semiprime, namely 192. 128 was counted in the previous entry.
		

Crossrefs

Programs

  • Mathematica
    AlmostPrimePi[k_Integer, n_] := Module[{a, i}, a[0] = 1; If[k == 1, PrimePi[n], Sum[PrimePi[n/Times @@ Prime[Array[a, k - 1]]] - a[k - 1] + 1, Evaluate[ Sequence @@ Table[{a[i], a[i - 1], PrimePi[(n/Times @@ Prime[Array[a, i - 1]])^(1/(k - i + 1))]}, {i, k - 1}]]]]]; (* Eric W. Weisstein, Feb 07 2006 *)
    t = Table[AlmostPrimePi[7, 2^n], {n, 0, 30}]; Rest@t - Most@t

A120039 Number of 8-almost primes 8ap such that 2^n < 8ap <= 2^(n+1).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 8, 22, 47, 101, 229, 473, 1044, 2171, 4634, 9796, 20513, 43020, 89684, 187361, 388633, 807508, 1671160, 3455934, 7135226, 14708436, 30286472, 62280024, 127944070, 262543635, 538266791, 1102507513, 2256357137
Offset: 0

Views

Author

Keywords

Comments

The partial sum equals the number of Pi_8(2^n).

Examples

			(2^8, 2^9] there is one semiprime, namely 384. 256 was counted in the previous entry.
		

Crossrefs

Programs

  • Mathematica
    AlmostPrimePi[k_Integer, n_] := Module[{a, i}, a[0] = 1; If[k == 1, PrimePi[n], Sum[PrimePi[n/Times @@ Prime[Array[a, k - 1]]] - a[k - 1] + 1, Evaluate[ Sequence @@ Table[{a[i], a[i - 1], PrimePi[(n/Times @@ Prime[Array[a, i - 1]])^(1/(k - i + 1))]}, {i, k - 1}]]]]]; (* Eric W. Weisstein, Feb 07 2006 *)
    t = Table[AlmostPrimePi[8, 2^n], {n, 0, 30}]; Rest@t - Most@t

A120040 Number of 9-almost primes 9ap such that 2^n < 9ap <= 2^(n+1).

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 8, 22, 47, 102, 232, 482, 1062, 2217, 4738, 10051, 21083, 44315, 92608, 193824, 402936, 838879, 1739794, 3605077, 7457977, 15404202, 31781036, 65481376, 134777594, 277096118, 569173839, 1168002568, 2394834166
Offset: 0

Views

Author

Keywords

Comments

The partial sum equals the number of Pi_9(2^n).

Examples

			(2^9, 2^10] there is one semiprime, namely 768. 512 was counted in the previous entry.
		

Crossrefs

Programs

  • Mathematica
    AlmostPrimePi[k_Integer, n_] := Module[{a, i}, a[0] = 1; If[k == 1, PrimePi[n], Sum[PrimePi[n/Times @@ Prime[Array[a, k - 1]]] - a[k - 1] + 1, Evaluate[ Sequence @@ Table[{a[i], a[i - 1], PrimePi[(n/Times @@ Prime[Array[a, i - 1]])^(1/(k - i + 1))]}, {i, k - 1}]]]]]; (* Eric W. Weisstein, Feb 07 2006 *)
    t = Table[AlmostPrimePi[9, 2^n], {n, 0, 30}]; Rest@t - Most@t
Previous Showing 21-30 of 118 results. Next