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 67 results. Next

A374717 For n a power of 2, a(n) = n. Otherwise let k = n - 2^j (> 0) where 2^j is the greatest power of 2 not exceeding n, then a(n) = least novel m*a(k); m a term in A033844.

Original entry on oeis.org

1, 2, 3, 4, 7, 6, 9, 8, 19, 14, 21, 12, 49, 18, 27, 16, 53, 38, 57, 28, 133, 42, 63, 24, 361, 98, 147, 36, 343, 54, 81, 32, 131, 106, 159, 76, 371, 114, 171, 56, 1007, 266, 399, 84, 931, 126, 189, 48, 2809, 722, 1083, 196, 2527, 294, 441, 72, 6859, 686, 1029, 108, 2401, 162, 243, 64, 311
Offset: 1

Views

Author

David James Sycamore, Jul 17 2024

Keywords

Comments

Definition developed from the Doudna recursion A005940, see Example. Conjectured to be a permutation of A318400, numbers whose prime factorization consists only of primes with indices 2^k (terms in A033844).
From David James Sycamore, Aug 09 2024: (Start)
The even bisection when divided by 2 returns the sequence. The odd bisection when transformed by replacing all factors prime(2^k) in a(2*n-1) with prime(2^(k-1)) also returns the sequence (similar to properties of A005940). The sequence is fixed on numbers of the form 2^n or 3*2^n (A029744), since by the definition points at 2^n are already named as such, and if n = 3*2^r then the powers of 2 adjacent to n are 2^r < 2^(r+1) < 3*2^r < 2^(r+2), from which, by the definition we find k = 2^(r+2) - 3*2^r = 2^r(3 - 2) = 2^r, which is a fixed point so a(k) = 2^r, and a(n) is least novel m*a(k); m a term in A033844. Since 2^r is already a term the required m is 3, so a(n) = 3*2^r = n (compare with fixed points of A005940). (End)
Definition analogous to the Name of A005940: Let c_i = number of 1's in binary expansion of n-1 that have i 0's to their right, and let p(j) = j-th prime. Then a(n) = Product_i p(2^i)^c_i. - Michael De Vlieger, Aug 09 2024

Examples

			a(1) = 1, a(2) = 2 because both are powers of 2. a(3) = 3 since for n = 3, k = 1, a(1) = 1 and m = 3. a(4) = 4 because 4 is a power of 2
For a(5), k = 1, a(1) = 1 and therefore a(5) = 1*7 since 7 is least term in A033844 not already used.
Whereas the Name defines each individual term recursively, the following procedure describes a recursion for generating the first 2^k terms from the first 2^(k-1) terms: Let S(0) = {1}, and then S(k) = {2*S(k-1), S(k-1)}, where 2*S(k-1) means twice every term in S(k-1). Thus from
       S(0) = {1} we obtain:
       S(1) = {2,1},
       S(2) = {4,2,2,1},
       S(3) = {8,4,4,2,4,2,2,1},
       S(4) = {16,8,8,4,8,4,4,2,8,4,4,2,4,2,2,1} etc.
Convert these (indices) to primes as follows:
       P(0) = {2},
       P(1) = {3,2},
       P(2) = {7,3,3,2},
       P(3) = {19,7,7,3,7,3,3,2},
       P(4) = {53,19,19,7,19,7,7,3,19,7,7,3,7,3,3,2}, etc.
Set U(0) = 1 and U(k) = U(k-1)*P(k-1) prepended by U(k-1), thus:
       U(0) = {1},
       U(1) = {1,2},
       U(2) = {1,2,3,4},
       U(3) = {1,2,3,4,7,6,9,8},
       U(4) = {1,2,3,4,7,6,9,8,19,14,21,12,49,18,27,16}, etc.
Thus U(k) gives the first 2^k terms of the sequence because the primes in P(k) are the greatest prime factors of the corresponding terms.
From _Michael De Vlieger_, Aug 09 2024: (Start)
Using the alternative binary definition:
For n = 9, n-1 = 1000_2; c_3 = 1, hence a(9) = prime(2^3)^1 = 19.
For n = 10, n-1 = 1001_2; c_0 = 1, c_2 = 1; a(10) = prime(2^0)^1 * prime(2^2)^1 = 2*7 = 14.
For n = 11, n-1 = 1010_2; c_1 = 1, c_2 = 1; a(11) = prime(2^1)^1 * prime(2^2)^1 = 3*7 = 21.
For n = 12, n-1 = 1011_2; c_0 = 2, c_1 = 1; a(12) = prime(2^0)^2 * prime(2^1)^1 = 2^2*3 = 12.
For n = 13, n-1 = 1100_2; c_2 = 2; a(13) = prime(2^2)^2 = 7^2 = 49.
For n = 2^k + 2^(k-1) = 3*2^(k-1), n-1 = 2^(k+1) - 2^(k-1) - 1.
  c_0 = k-1, c_1 = 1, therefore we have fixed point a(3*2^(k-1)) = 3*2^(k-1). (End)
		

Crossrefs

Programs

  • Mathematica
    Block[{a, c, k, m, t, nn}, nn = 2^7; c[_] = False;
    Do[Set[{m, k}, {1, n - 2^Floor[Log2[n]]}];
      If[k == 0,
        Set[{a[n], c[n]}, {n, True}],
        While[Set[t, Prime[2^m] a[k]]; c[t], m++];
          Set[{a[n], c[t]}, {t, True}]], {n, nn}];
    Array[a, nn] ] (* Michael De Vlieger, Aug 06 2024 *)

Formula

a(2^k) = 2^k, a(3*2^k) = 3*2^k.
a(2^k-1) = 3^(k-1), k >= 1; a(2^k+1) = A033844(k+1); k >= 0.

A000720 pi(n), the number of primes <= n. Sometimes called PrimePi(n) to distinguish it from the number 3.14159...

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Partial sums of A010051 (characteristic function of primes). - Jeremy Gardiner, Aug 13 2002
pi(n) and prime(n) are inverse functions: a(A000040(n)) = n and A000040(n) is the least number m such that A000040(a(m)) = A000040(n). A000040(a(n)) = n if (and only if) n is prime. - Jonathan Sondow, Dec 27 2004
See the additional references and links mentioned in A143227. - Jonathan Sondow, Aug 03 2008
A lower bound that gets better with larger N is that there are at least T prime numbers less than N, where the recursive function T is: T = N - N*Sum_{i=0..T(sqrt(N))} A005867(i)/A002110(i). - Ben Paul Thurston, Aug 23 2010
Number of partitions of 2n into exactly two parts with the smallest part prime. - Wesley Ivan Hurt, Jul 20 2013
Equivalent to the Riemann hypothesis: abs(a(n) - li(n)) < sqrt(n)*log(n)/(8*Pi), for n >= 2657, where li(n) is the logarithmic integral (Lowell Schoenfeld). - Ilya Gutkovskiy, Jul 05 2016
The second Hardy-Littlewood conjecture, that pi(x) + pi(y) >= pi(x + y) for integers x and y with min{x, y} >= 2, is known to hold for (x, y) sufficiently large (Udrescu 1975). - Peter Luschny, Jan 12 2021

Examples

			There are 3 primes <= 6, namely 2, 3 and 5, so pi(6) = 3.
		

References

  • M. Abramowitz and I. A. Stegun, eds., Handbook of Mathematical Functions, National Bureau of Standards Applied Math. Series 55, 1964 (and various reprintings), p. 870.
  • Tom M. Apostol, Introduction to Analytic Number Theory, Springer-Verlag, 1976, p. 8.
  • Raymond Ayoub, An Introduction to the Analytic Theory of Numbers, Amer. Math. Soc., 1963; p. 129.
  • Florian Cajori, A History of Mathematical Notations, Dover edition (2012), par. 409.
  • Richard Crandall and Carl Pomerance, Prime Numbers: A Computational Perspective, Springer, NY, 2001; see p. 5.
  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, 5th ed., Oxford Univ. Press, 1979, Theorems 6, 7, 420.
  • G. J. O. Jameson, The Prime Number Theorem, Camb. Univ. Press, 2003. [See also the review by D. M. Bressoud (link below).]
  • Władysław Narkiewicz, The Development of Prime Number Theory, Springer-Verlag, 2000.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See pp. 132-133, 157-184.
  • József Sándor, Dragoslav S. Mitrinovic and Borislav Crstici, Handbook of Number Theory I, Springer Science & Business Media, 2005, Section VII.1. (For inequalities, etc.).
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Gerald Tenenbaum and Michel Mendès France, Prime Numbers and Their Distribution, AMS Providence RI, 1999.
  • V. Udrescu, Some remarks concerning the conjecture pi(x + y) <= pi(x) + pi(y), Rev. Roumaine Math. Pures Appl. 20 (1975), 1201-1208.

Crossrefs

Closely related:
A099802: Number of primes <= 2n.
A060715: Number of primes between n and 2n (exclusive).
A035250: Number of primes between n and 2n (inclusive).
A038107: Number of primes < n^2.
A014085: Number of primes between n^2 and (n+1)^2.
A007053: Number of primes <= 2^n.
A036378: Number of primes p between powers of 2, 2^n < p <= 2^(n+1).
A006880: Number of primes < 10^n.
A006879: Number of primes with n digits.
A033270: Number of odd primes <= n.
A065855: Number of composites <= n.
For lists of large values of a(n) see, e.g., A005669(n) = a(A002386(n)), A214935(n) = a(A205827(n)).
Related sequences:
Primes (p) and composites (c): A000040, A002808, A065855.
Primes between p(n) and 2*p(n): A063124, A070046; between c(n) and 2*c(n): A376761; between n and 2*n: A035250, A060715, A077463, A108954.
Composites between p(n) and 2*p(n): A246514; between c(n) and 2*c(n): A376760; between n and 2*n: A075084, A307912, A307989, A376759.

Programs

  • Haskell
    a000720 n = a000720_list !! (n-1)
    a000720_list = scanl1 (+) a010051_list  -- Reinhard Zumkeller, Sep 15 2011
    
  • Magma
    [ #PrimesUpTo(n): n in [1..200] ];  // Bruno Berselli, Jul 06 2011
    
  • Maple
    with(numtheory); A000720 := pi; [ seq(A000720(i),i=1..50) ];
  • Mathematica
    A000720[n_] := PrimePi[n]; Table[ A000720[n], {n, 1, 100} ]
    Array[ PrimePi[ # ]&, 100 ]
    Accumulate[Table[Boole[PrimeQ[n]],{n,100}]] (* Harvey P. Dale, Jan 17 2015 *)
  • PARI
    A000720=vector(100,n,omega(n!)) \\ For illustration only; better use A000720=primepi
    
  • PARI
    vector(300,j,primepi(j)) \\ Joerg Arndt, May 09 2008
    
  • Python
    from sympy import primepi
    for n in range(1,100): print(primepi(n), end=', ') # Stefano Spezia, Nov 30 2018
  • Sage
    [prime_pi(n) for n in range(1, 79)]  # Zerinvary Lajos, Jun 06 2009
    

Formula

The prime number theorem gives the asymptotic expression a(n) ~ n/log(n).
For x > 1, pi(x) < (x / log x) * (1 + 3/(2 log x)). For x >= 59, pi(x) > (x / log x) * (1 + 1/(2 log x)). [Rosser and Schoenfeld]
For x >= 355991, pi(x) < (x / log(x)) * (1 + 1/log(x) + 2.51/(log(x))^2 ). For x >= 599, pi(x) > (x / log(x)) * (1 + 1/log(x)). [Dusart]
For x >= 55, x/(log(x) + 2) < pi(x) < x/(log(x) - 4). [Rosser]
For n > 1, A138194(n) <= a(n) <= A138195(n) (Tschebyscheff, 1850). - Reinhard Zumkeller, Mar 04 2008
For n >= 33, a(n) = 1 + Sum_{j=3..n} ((j-2)! - j*floor((j-2)!/j)) (Hardy and Wright); for n >= 1, a(n) = n - 1 + Sum_{j=2..n} (floor((2 - Sum_{i=1..j} (floor(j/i)-floor((j-1)/i)))/j)) (Ruiz and Sondow 2000). - Benoit Cloitre, Aug 31 2003
a(n) = A001221(A000142(n)). - Benoit Cloitre, Jun 03 2005
G.f.: Sum_{p prime} x^p/(1-x) = b(x)/(1-x), where b(x) is the g.f. for A010051. - Franklin T. Adams-Watters, Jun 15 2006
a(n) = A036234(n) - 1. - Jaroslav Krizek, Mar 23 2009
From Enrique Pérez Herrero, Jul 12 2010: (Start)
a(n) = Sum_{i=2..n} floor((i+1)/A000203(i)).
a(n) = Sum_{i=2..n} floor(A000010(n)/(i-1)).
a(n) = Sum_{i=2..n} floor(2/A000005(n)). (End)
Let pf(n) denote the set of prime factors of an integer n. Then a(n) = card(pf(n!/floor(n/2)!)). - Peter Luschny, Mar 13 2011
a(n) = -Sum_{p <= n} mu(p). - Wesley Ivan Hurt, Jan 04 2013
a(n) = (1/2)*Sum_{p <= n} (mu(p)*d(p)*sigma(p)*phi(p)) + sum_{p <= n} p^2. - Wesley Ivan Hurt, Jan 04 2013
a(1) = 0 and then, for all k >= 1, repeat k A001223(k) times. - Jean-Christophe Hervé, Oct 29 2013
a(n) = n/(log(n) - 1 - Sum_{k=1..m} A233824(k)/log(n)^k + O(1/log(n)^{m+1})) for m > 0. - Jonathan Sondow, Dec 19 2013
a(n) = A001221(A003418(n)). - Eric Desbiaux, May 01 2014
a(n) = Sum_{j=2..n} H(-sin^2 (Pi*(Gamma(j)+1)/j)) where H(x) is the Heaviside step function, taking H(0)=1. - Keshav Raghavan, Jun 18 2016
a(A014076(n)) = (1/2) * (A014076(n) + 1) - n + 1. - Christopher Heiling, Mar 03 2017
From Steven Foster Clark, Sep 25 2018: (Start)
a(n) = Sum_{m=1..n} A143519(m) * floor(n/m).
a(n) = Sum_{m=1..n} A001221(m) * A002321(floor(n/m)) where A002321() is the Mertens function.
a(n) = Sum_{m=1..n} |A143519(m)| * A002819(floor(n/m)) where A002819() is the Liouville Lambda summatory function and |x| is the absolute value of x.
a(n) = Sum_{m=1..n} A137851(m)/m * H(floor(n/m)) where H(n) = Sum_{m=1..n} 1/m is the harmonic number function.
a(n) = Sum_{m=1..log_2(n)} A008683(m) * A025528(floor(n^(1/m))) where A008683() is the Moebius mu function and A025528() is the prime-power counting function.
(End)
Sum_{k=2..n} 1/a(k) ~ (1/2) * log(n)^2 + O(log(n)) (de Koninck and Ivić, 1980). - Amiram Eldar, Mar 08 2021
a(n) ~ 1/(n^(1/n)-1). - Thomas Ordowski, Jan 30 2023
a(n) = Sum_{j=2..n} floor(((j - 1)! + 1)/j - floor((j - 1)!/j)) [Mináč, unpublished] (see Ribenboim, pp. 132-133). - Stefano Spezia, Apr 13 2025
a(n) = n - 1 - Sum_{k=2..floor(log_2(n))} pi_k(n), where pi_k(n) is the number of k-almost primes <= n. - Daniel Suteu, Aug 27 2025

Extensions

Additional links contributed by Lekraj Beedassy, Dec 23 2003
Edited by M. F. Hasler, Apr 27 2018 and (links recovered) Dec 21 2018

A006988 a(n) = (10^n)-th prime.

Original entry on oeis.org

2, 29, 541, 7919, 104729, 1299709, 15485863, 179424673, 2038074743, 22801763489, 252097800623, 2760727302517, 29996224275833, 323780508946331, 3475385758524527, 37124508045065437, 394906913903735329, 4185296581467695669, 44211790234832169331
Offset: 0

Views

Author

Keywords

Comments

Check the b-file for terms beyond those listed above.

Examples

			a(0) = 10^0-th prime = first prime = 2.
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 111.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A099260, A274767 ((leading) digits of 103-digit a(100)).

Programs

Extensions

More terms from Paul Zimmermann
a(19) from Marc Deleglise, Jun 29 2008
a(20) found by Andrey V. Kulsha using a program by Xavier Gourdon, Oct 05 2011
a(21) from Henri Lifchitz, Sep 09 2014
a(22) from Henri Lifchitz, Nov 21 2014

A127301 Matula-Goebel signatures for plane general trees encoded by A014486.

Original entry on oeis.org

1, 2, 4, 3, 8, 6, 6, 7, 5, 16, 12, 12, 14, 10, 12, 9, 14, 19, 13, 10, 13, 17, 11, 32, 24, 24, 28, 20, 24, 18, 28, 38, 26, 20, 26, 34, 22, 24, 18, 18, 21, 15, 28, 21, 38, 53, 37, 26, 37, 43, 29, 20, 15, 26, 37, 23, 34, 43, 67, 41, 22, 29, 41, 59, 31, 64, 48, 48, 56, 40, 48, 36
Offset: 0

Views

Author

Antti Karttunen, Jan 16 2007

Keywords

Comments

This sequence maps A000108(n) oriented (plane) rooted general trees encoded in range [A014137(n-1)..A014138(n)] of A014486 to A000081(n+1) distinct non-oriented rooted general trees, encoded by their Matula-Goebel numbers. The latter encoding is explained in A061773.
A005517 and A005518 give the minimum and maximum value occurring in each such range.
Primes occur at positions given by A057548 (not in order, and with duplicates), and similarly, semiprimes, A001358, occur at positions given by A057518, and in general, A001222(a(n)) = A057515(n).
If the signature-permutation of a Catalan automorphism SP satisfies the condition A127301(SP(n)) = A127301(n) for all n, then it preserves the non-oriented form of a general tree, which implies also that it is Łukasiewicz-word permuting, satisfying A129593(SP(n)) = A129593(n) for all n >= 0. Examples of such automorphisms include A072796, A057508, A057509/A057510, A057511/A057512, A057164, A127285/A127286 and A127287/A127288.
A206487(n) tells how many times n occurs in this sequence. - Antti Karttunen, Jan 03 2013

Examples

			A000081(n+1) distinct values occur each range [A014137(n-1)..A014138(n-1)]. As an example, A014486(5) = 44 (= 101100 in binary = A063171(5)), encodes the following plane tree:
.....o
.....|
.o...o
..\./.
...*..
Matula-Goebel encoding for this tree gives a code number A000040(1) * A000040(A000040(1)) = 2*3 = 6, thus a(5)=6.
Likewise, A014486(6) = 50 (= 110010 in binary = A063171(6)) encodes the plane tree:
.o
.|
.o...o
..\./.
...*..
Matula-Goebel encoding for this tree gives a code number A000040(A000040(1)) * A000040(1) = 3*2 = 6, thus a(6) is also 6, which shows these two trees are identical if one ignores their orientation.
		

Crossrefs

a(A014138(n)) = A007097(n+1), a(A014137(n)) = A000079(n+1) for all n.
a(|A106191(n)|) = A033844(n-1) for all n >= 1.
For standard instead of binary encoding we have A358506.
A000108 counts ordered rooted trees, unordered A000081.
A014486 lists binary encodings of ordered rooted trees.

Programs

  • Mathematica
    mgnum[t_]:=If[t=={},1,Times@@Prime/@mgnum/@t];
    binbalQ[n_]:=n==0||With[{dig=IntegerDigits[n,2]},And@@Table[If[k==Length[dig],SameQ,LessEqual][Count[Take[dig,k],0],Count[Take[dig,k],1]],{k,Length[dig]}]];
    bint[n_]:=If[n==0,{},ToExpression[StringReplace[StringReplace[ToString[IntegerDigits[n,2]/.{1->"{",0->"}"}],","->""],"} {"->"},{"]]];
    Table[mgnum[bint[n]],{n,Select[Range[0,1000],binbalQ]}] (* Gus Wiseman, Nov 22 2022 *)
  • Scheme
    (define (A127301 n) (*A127301 (A014486->parenthesization (A014486 n)))) ;; A014486->parenthesization given in A014486.
    (define (*A127301 s) (if (null? s) 1 (fold-left (lambda (m t) (* m (A000040 (*A127301 t)))) 1 s)))

Formula

A001222(a(n)) = A057515(n) for all n.

A055875 a(0)=1, a(n) = prime(n^3).

Original entry on oeis.org

1, 2, 19, 103, 311, 691, 1321, 2309, 3671, 5519, 7919, 10957, 14753, 19403, 24809, 31319, 38873, 47657, 57559, 69031, 81799, 96137, 112291, 130073, 149717, 171529, 195043, 220861, 248851, 279431, 312583, 347707, 386093, 427169, 470933, 517553
Offset: 0

Views

Author

Steven Pigeon (pigeon(AT)iro.umontreal.ca), Jul 14 2000

Keywords

Comments

A sequence of increments for Shell sort that produces good results. A bit better than Sedgewick's A036562 and A003462.

Crossrefs

Sequences used for Shell sort: A003462, A033622, A036562, A036564, A036569, A055875.

Programs

  • Magma
    [NthPrime(n^3): n in [0..50] ]; // Vincenzo Librandi, Apr 22 2011
    
  • Mathematica
    {1}~Join~Array[Prime[#^3] &, 35] (* Michael De Vlieger, Apr 13 2021 *)
  • PARI
    first(n) = { my(res = vector(n), t = 0); forprime(p = 2, oo, t++; if(ispower(t, 3, &i), print1([i, p]", "); res[i] = p; if(i >= n, return(concat(1, res))))) } \\ David A. Corneth, Apr 13 2021

Formula

a(n) = A000040(A000578(n)), n>0.

Extensions

More terms from Jonathan Vos Post, Aug 13 2005

A324929 Numbers whose product of prime indices is even.

Original entry on oeis.org

3, 6, 7, 9, 12, 13, 14, 15, 18, 19, 21, 24, 26, 27, 28, 29, 30, 33, 35, 36, 37, 38, 39, 42, 43, 45, 48, 49, 51, 52, 53, 54, 56, 57, 58, 60, 61, 63, 65, 66, 69, 70, 71, 72, 74, 75, 76, 77, 78, 79, 81, 84, 86, 87, 89, 90, 91, 93, 95, 96, 98, 99, 101, 102, 104
Offset: 1

Views

Author

Gus Wiseman, Mar 21 2019

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798, with product A003963(n).
Also Heinz numbers of integer partitions whose product of parts is even (counted by A047967), where the Heinz number of an integer partition (y_1,...,y_k) is prime(y_1) * ... * prime(y_k).

Examples

			The sequence of terms together with their prime indices begins:
   3: {2}
   6: {1,2}
   7: {4}
   9: {2,2}
  12: {1,1,2}
  13: {6}
  14: {1,4}
  15: {2,3}
  18: {1,2,2}
  19: {8}
  21: {2,4}
  24: {1,1,1,2}
  26: {1,6}
  27: {2,2,2}
  28: {1,1,4}
  29: {10}
  30: {1,2,3}
  33: {2,5}
  35: {3,4}
  36: {1,1,2,2}
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100],EvenQ[Times@@PrimePi/@If[#==1,{},FactorInteger[#]][[All,1]]]&]
  • PARI
    isok(n) = my(f=factor(n)[,1]); !(prod(k=1, #f, primepi(f[k])) % 2); \\ Michel Marcus, Mar 22 2019

A318400 Numbers whose prime indices are all powers of 2 (including 1).

Original entry on oeis.org

1, 2, 3, 4, 6, 7, 8, 9, 12, 14, 16, 18, 19, 21, 24, 27, 28, 32, 36, 38, 42, 48, 49, 53, 54, 56, 57, 63, 64, 72, 76, 81, 84, 96, 98, 106, 108, 112, 114, 126, 128, 131, 133, 144, 147, 152, 159, 162, 168, 171, 189, 192, 196, 212, 216, 224, 228, 243, 252, 256, 262
Offset: 1

Views

Author

Gus Wiseman, Dec 16 2018

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The sequence of all integer partitions whose parts are all powers of 2 (including 1) begins: (), (1), (2), (11), (21), (4), (111), (22), (211), (41), (1111), (221), (8), (42), (2111), (222), (411), (11111), (2211), (81), (421), (21111), (44).
		

Crossrefs

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    pow2Q[n_]:=Or[n==1,MatchQ[FactorInteger[n],{{2,_}}]];
    Select[Range[100],And@@pow2Q/@primeMS[#]&]

Formula

Sum_{n>=1} 1/a(n) = 1/Product_{k>=0} (1 - 1/prime(2^k)) = 3.81625872357742992578... . - Amiram Eldar, Dec 03 2022

A038833 3^n-th prime.

Original entry on oeis.org

2, 5, 23, 103, 419, 1543, 5519, 19289, 65687, 220861, 733561, 2412779, 7867547, 25485211, 82064027, 262960091, 839001721, 2666790167, 8448283757, 26684834641, 84064182061, 264194301347, 828513359549, 2593131866483, 8101615860589, 25270000074757, 78701296245541, 244766272211729, 760254097357847, 2358539553316997
Offset: 0

Views

Author

Keywords

Crossrefs

Programs

Extensions

a(24)-a(29) from Charles R Greathouse IV, Nov 02 2014

A051439 a(n) = prime(2^n + 1).

Original entry on oeis.org

3, 5, 11, 23, 59, 137, 313, 727, 1621, 3673, 8167, 17881, 38891, 84047, 180511, 386117, 821647, 1742539, 3681149, 7754081, 16290073, 34136059, 71378603, 148948141, 310248251, 645155227, 1339484207, 2777105131, 5750079077
Offset: 0

Views

Author

Keywords

Examples

			a(0) = prime(2^0+1) = prime(2) = 3,
a(1) = prime(2+1) = prime(3) = 5,
a(2) = prime(2^2+1) = prime(5) = 11,
a(3) = prime(2^3+1) = prime(9) = 23, and so on. - _N. J. A. Sloane_, Dec 09 2020
		

Crossrefs

Programs

  • Mathematica
    Prime[2^Range[0,30]+1] (* Harvey P. Dale, Jan 19 2014 *)

Extensions

More terms from Michael Lugo (mlugo(AT)thelabelguy.com), Dec 22 1999

A353397 Replace prime(k) with prime(2^k) in the prime factorization of n.

Original entry on oeis.org

1, 3, 7, 9, 19, 21, 53, 27, 49, 57, 131, 63, 311, 159, 133, 81, 719, 147, 1619, 171, 371, 393, 3671, 189, 361, 933, 343, 477, 8161, 399, 17863, 243, 917, 2157, 1007, 441, 38873, 4857, 2177, 513, 84017, 1113, 180503, 1179, 931, 11013, 386093, 567, 2809, 1083
Offset: 1

Views

Author

Gus Wiseman, May 17 2022

Keywords

Examples

			The terms together with their prime indices begin:
      1: {}
      3: {2}
      7: {4}
      9: {2,2}
     19: {8}
     21: {2,4}
     53: {16}
     27: {2,2,2}
     49: {4,4}
     57: {2,8}
    131: {32}
     63: {2,2,4}
		

Crossrefs

These are the positions of first appearances in A353394.
A001222 counts prime factors with multiplicity, distinct A001221.
A003963 gives product of prime indices, counted by A339095.
A033844 lists primes indexed by powers of 2.
A056239 adds up prime indices, row sums of A112798 and A296150.
A124010 gives prime signature, sorted A118914, product A005361.
A181819 gives prime shadow, firsts A181821, relatively prime A325131.
Equivalent sequence with prime(2*k) instead of prime(2^k): A297002.

Programs

  • Mathematica
    primeMS[n_]:=If[n==1,{},Flatten[Cases[FactorInteger[n],{p_,k_}:>Table[PrimePi[p],{k}]]]];
    Table[Times@@Prime/@(2^primeMS[n]),{n,100}]
  • PARI
    a(n) = my(f=factor(n)); for(k=1, #f~, f[k,1] = prime(2^primepi(f[k,1]))); factorback(f); \\ Michel Marcus, May 20 2022
    
  • Python
    from math import prod
    from sympy import prime, primepi, factorint
    def A353397(n): return prod(prime(2**primepi(p))**e for p, e in factorint(n).items()) # Chai Wah Wu, May 20 2022

Formula

If n = prime(e_1)...prime(e_k), then a(n) = prime(2^(e_1))...prime(2^(e_k)).
Sum_{n>=1} 1/a(n) = 1/Product_{k>=1} (1 - 1/prime(2^k)) = 1.90812936178871496289... . - Amiram Eldar, Dec 09 2022
Showing 1-10 of 67 results. Next