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

A051006 Prime constant: decimal value of (A010051 interpreted as a binary number).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

From Ferenc Adorjan (fadorjan(AT)freemail.hu): (Start)
Decimal expansion of the representation of the sequence of primes by a single real in (0,1).
Any monotonic integer sequence can be represented by a real number in (0, 1) in such a way that in the binary representation of the real, the n-th digit of the fractional part is 1 if and only if n is in the sequence.
Examples of the inverse mapping are A092855 and A092857. (End)
Is the prime constant an EL number? See Chow's 1999 article. - Lorenzo Sauras Altuzarra, Oct 05 2020
The asymptotic density of numbers with a prime number of trailing 0's in their binary representation (A370596), or a prime number of trailing 1's. - Amiram Eldar, Feb 23 2024

Examples

			0.414682509851111660... (base 10) = .01101010001010001010001... (base 2).
		

Crossrefs

Programs

  • Maple
    a := n -> ListTools:-Reverse(convert(floor(evalf[1000](sum(1/2^ithprime(k), k = 1 .. infinity)*10^(n+1))), base, 10))[n+1]: - Lorenzo Sauras Altuzarra, Oct 05 2020
  • Mathematica
    RealDigits[ FromDigits[ {{Table[ If[ PrimeQ[n], 1, 0], {n, 370}]}, 0}, 2], 10, 111][[1]] (* Robert G. Wilson v, Jan 15 2005 *)
    RealDigits[Sum[1/2^Prime[k], {k, 1000}], 10, 100][[1]] (* Alexander Adamchuk, Aug 22 2006 *)
  • PARI
    { mt(v)= /*Returns the binary mapping of v monotonic sequence as a real in (0,1)*/ local(a=0.0,p=1,l);l=matsize(v)[2]; for(i=1,l,a+=2^(-v[i])); return(a)} \\ Ferenc Adorjan
    
  • PARI
    { default(realprecision, 20080); x=0; m=67000; for (n=1, m, if (isprime(n), a=1, a=0); x=2*x+a; ); x=10*x/2^m; for (n=0, 20000, d=floor(x); x=(x-d)*10; write("b051006.txt", n, " ", d)); } \\ Harry J. Smith, Jun 15 2009
    
  • PARI
    suminf(n=1,.5^prime(n)) \\ Then: digits(%\.1^default(realprecision)) to get seq. of digits. N.B.: Functions sumpos() and sumnum() yield much less accurate results. - M. F. Hasler, Jul 04 2017

Formula

Prime constant C = Sum_{k>=1} 1/2^prime(k), where prime(k) is the k-th prime. - Alexander Adamchuk, Aug 22 2006
From Amiram Eldar, Aug 11 2020: (Start)
Equals Sum_{k>=1} A010051(k)/2^k.
Equals Sum_{k>=1} 1/A034785(k).
Equals (1/2) * A119523.
Equals Sum_{k>=1} pi(k)/2^(k+1), where pi(k) = A000720(k). (End)

A143519 Moebius transform of A010051, the characteristic function of the primes: a(n) = Sum_{d|n} mu(n/d)*A010051(d); A054525 * A010051.

Original entry on oeis.org

0, 1, 1, -1, 1, -2, 1, 0, -1, -2, 1, 1, 1, -2, -2, 0, 1, 1, 1, 1, -2, -2, 1, 0, -1, -2, 0, 1, 1, 3, 1, 0, -2, -2, -2, 0, 1, -2, -2, 0, 1, 3, 1, 1, 1, -2, 1, 0, -1, 1, -2, 1, 1, 0, -2, 0, -2, -2, 1, -1, 1, -2, 1, 0, -2, 3, 1, 1, -2, 3, 1, 0, 1, -2, 1, 1, -2, 3, 1, 0, 0, -2, 1, -1, -2, -2, -2, 0, 1
Offset: 1

Views

Author

Gary W. Adamson, Aug 22 2008

Keywords

Comments

A010051 = A051731 * A143519 (since A051731 = the inverse Mobius transform).
A000720(n) = Sum_{k=1..n} a(k) floor(n/k) where A000720(n) is the number of primes <= n. - Steven Foster Clark, May 25 2018

Examples

			a(4) = -1 since row 4 of triangle A043518 = (0, -1, 0, 0).
a(4) = -1 = (0, -1, 0, 1) dot (0, 1, 1, 0), where (0, -1, 0, 1) = row 4 of A054525 and A010051 = (0, 1, 1, 0, 1, 0, 1, 0, ...).
		

Crossrefs

Programs

  • Mathematica
    Table[Sum[MoebiusMu[n/d] Boole[PrimeQ@ d], {d, Divisors@ n}], {n, 89}] (* Michael De Vlieger, Jul 19 2017 *)
  • PARI
    A143519(n) = sumdiv(n,d,isprime(d)*moebius(n/d)); \\ (After Luschny's Sage-code) - Antti Karttunen, Jul 19 2017
  • Sage
    def A143519(n) :
        D = filter(is_prime, divisors(n))
        return add(moebius(n/d) for d in D)
    [A143519(n) for n in (1..89)]   # Peter Luschny, Feb 01 2012
    

Formula

Mobius transform of A010051, the characteristic function of the primes.
Row sums of triangle A143518.
a(n) = Sum_{d|n} A010051(d)*A008683(n/d). - Antti Karttunen, Jul 19 2017
a(n) = Sum_{a*b*c=n} omega(a)*mu(b)*mu(c). - Benedict W. J. Irwin, Mar 02 2022

Extensions

More terms from R. J. Mathar, Jan 19 2009

A329350 a(n) = Product_{d|n} A276086(d)^A010051(n/d).

Original entry on oeis.org

1, 2, 2, 3, 2, 18, 2, 9, 6, 54, 2, 45, 2, 30, 108, 15, 2, 150, 2, 405, 60, 270, 2, 375, 18, 150, 30, 675, 2, 33750, 2, 225, 540, 1350, 180, 3125, 2, 750, 300, 5625, 2, 281250, 2, 10125, 4500, 6750, 2, 140625, 10, 56250, 2700, 16875, 2, 468750, 1620, 84375, 1500, 33750, 2, 65625, 2, 42, 22500, 21, 900, 236250, 2, 567, 13500, 425250, 2, 21875
Offset: 1

Views

Author

Antti Karttunen, Nov 12 2019

Keywords

Crossrefs

Cf. A010051, A069359, A276085, A276086, A329351 (rgs-transform).
Cf. also A329352, A329380.

Programs

  • PARI
    A276086(n) = { my(m=1, p=2); while(n, m *= (p^(n%p)); n = n\p; p = nextprime(1+p)); (m); };
    A329350(n) = { my(m=1); fordiv(n,d,if(isprime(n/d), m *= A276086(d))); (m); };

Formula

a(n) = Product_{d|n} A276086(d)^A010051(n/d).
A276085(a(n)) = A069359(n).

A121497 Binomial transform of the characteristic function of the prime numbers (A010051).

Original entry on oeis.org

0, 0, 1, 4, 10, 21, 41, 78, 148, 282, 537, 1013, 1882, 3446, 6267, 11468, 21416, 41209, 81771, 166042, 340994, 700570, 1429375, 2886777, 5771828, 11453105, 22638215, 44742141, 88681674, 176545766, 352992931, 707922077, 1421120880, 2849433326
Offset: 0

Views

Author

T. D. Noe, Aug 03 2006

Keywords

Comments

This is the binomial transform of the sequence {0,0,1,1,0,1,0,1,...}. Sequence A052467, the binomial transform of the sequence {0,1,1,0,1,0,1,...} is very similar. In fact, the first differences of this sequence yields A052467.
The number of pernicious numbers (A052294) less than 2^n. Although the graph looks almost like 2^n, the graph of a(n)/2^n has quite a bit of variation. - T. D. Noe, Mar 14 2009
a(n)/2^n is the probability that a series of Bernoulli trials with probability of success equal to 1/2 will result in a prime number of successes. Cf. A178851. - Eric M. Schmidt, Jul 13 2012
a(n) equals the number of subsets of [n] whose cardinalities are prime. - Ivan N. Ianakiev, Jul 14 2019
Upper and lower bounds are provided by Kim and Sinha (see links). - Jeffrey Shallit, Nov 14 2024

Crossrefs

Programs

  • Maple
    Primes:= select(isprime, [2,seq(i,i=3..100,2)]):
    G:= add((z/(1-z))^p/(1-z),p=Primes):
    S:= series(G,z,101):
    seq(coeff(S,z,i),i=0..100); # Robert Israel, Sep 27 2018
  • Mathematica
    Table[Sum[Binomial[n,Prime[i]], {i,PrimePi[n]}], {n,40}]
  • PARI
    a(n)=my(s);forprime(p=2,n,s+=binomial(n,p));s \\ Charles R Greathouse IV, Mar 22 2013

Formula

a(n) = Sum_{i=1..pi(n)} binomial(n,prime(i)), where pi(n) is A000720(n), the number of primes <= n.
E.g.f.: exp(x) * (x^2/2! + x^3/3! + x^5/5! + ...) - Eric M. Schmidt, Jul 14 2012
G.f.: Sum_{p prime} x^p/(1-x)^(p+1). - Robert Israel, Sep 27 2018

Extensions

a(0) inserted by Franklin T. Adams-Watters, Jul 13 2012

A320000 Square array A(n, k) read by descending antidiagonals: A(1, 1) = 2, A(1, k) = 1 for k > 1, and for n > 1, A(n, k) = Sum_{d|n, d>=k} A010051(1+d)*[Sum_{i=0..valuation(n,1+d)} A((n/d)/((1+d)^i), 1+d)].

Original entry on oeis.org

2, 1, 3, 1, 1, 0, 1, 0, 0, 4, 1, 0, 0, 1, 0, 1, 0, 0, 1, 0, 4, 1, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 1, 0, 5, 1, 0, 0, 0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 2, 1, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 6, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, 0
Offset: 1

Views

Author

Antti Karttunen, Dec 03 2018

Keywords

Comments

This square array gives the values obtained from the recursive PARI-program that M. F. Hasler has provided Oct 05 2009 for A014197, in its two-argument form.

Examples

			Array begins as:
n  | k=1, 2, 3, 4, 5, 6, 7, 8, 9,10,11,12,13,14,15,16, ...
---+------------------------------------------------
1  |   2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
2  |   3, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
3  |   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
4  |   4, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
5  |   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
6  |   4, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
7  |   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
8  |   5, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
9  |   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
10 |   2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, ...
11 |   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
12 |   6, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, ...
13 |   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
14 |   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
15 |   0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
16 |   6, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ...
		

Crossrefs

Cf. A014197 (column 1).

Programs

  • PARI
    up_to = 120;
    A320000sq(n, k) = if(1==n, if(1==k,2,1), sumdiv(n, d, if(d>=k && isprime(d+1), my(p=d+1, q=n/d); sum(i=0, valuation(n, p), A320000sq(q/(p^i), p))))); \\ After M. F. Hasler's code in A014197
    A320000list(up_to) = { my(v = vector(up_to), i=0); for(a=1,oo, for(col=1,a, i++; if(i > up_to, return(v)); v[i] = A320000sq(col,(a-(col-1))))); (v); };
    v320000 = A320000list(up_to);
    A320000(n) = v320000[n];

A329352 a(n) = Product_{d|n} A019565(d)^A010051(n/d).

Original entry on oeis.org

1, 2, 2, 3, 2, 18, 2, 5, 6, 30, 2, 75, 2, 90, 60, 7, 2, 210, 2, 105, 180, 126, 2, 245, 10, 210, 14, 525, 2, 66150, 2, 11, 252, 66, 300, 1155, 2, 198, 420, 385, 2, 173250, 2, 825, 2940, 990, 2, 847, 30, 3234, 132, 1155, 2, 15246, 420, 2695, 396, 2310, 2, 2223375, 2, 6930, 1540, 13, 700, 64350, 2, 195, 1980, 171990, 2, 5005, 2, 390, 32340, 975, 1260
Offset: 1

Views

Author

Antti Karttunen, Nov 12 2019

Keywords

Examples

			The divisors of 30 are [1, 2, 3, 5, 6, 10, 15, 30], of which only d = 6, 10 and 15 are such that 30/d is a prime, thus a(n) = A019565(6) * A019565(10) * A019565(15) = 15 * 21 * 210 = 66150.
		

Crossrefs

Cf. A010051, A019565, A048675, A069359, A329353 (rgs-transform).
Cf. also A329350.
Differs from A300832 for the first time at n=30, where a(30) = 66150, while A300832(30) = 132300.

Programs

  • PARI
    A019565(n) = {my(j,v); factorback(Mat(vector(if(n, #n=vecextract(binary(n), "-1..1")), j, [prime(j), n[j]])~))}; \\ From A019565
    A329352(n) = { my(m=1); fordiv(n,d,if(isprime(n/d), m *= A019565(d))); (m); };

Formula

a(n) = Product_{d|n} A019565(d)^A010051(n/d).
For all n, A048675(a(n)) = A069359(n).

A292596 a(1) = a(2) = 0; for n > 2, a(n) = A010051(n) + 2*a(floor(n/2)).

Original entry on oeis.org

0, 0, 1, 0, 1, 2, 3, 0, 0, 2, 3, 4, 5, 6, 6, 0, 1, 0, 1, 4, 4, 6, 7, 8, 8, 10, 10, 12, 13, 12, 13, 0, 0, 2, 2, 0, 1, 2, 2, 8, 9, 8, 9, 12, 12, 14, 15, 16, 16, 16, 16, 20, 21, 20, 20, 24, 24, 26, 27, 24, 25, 26, 26, 0, 0, 0, 1, 4, 4, 4, 5, 0, 1, 2, 2, 4, 4, 4, 5, 16, 16, 18, 19, 16, 16, 18, 18, 24, 25, 24, 24, 28, 28, 30, 30, 32, 33, 32, 32, 32, 33
Offset: 1

Views

Author

Antti Karttunen, Sep 27 2017

Keywords

Comments

1-bits in base-2 expansion of a(n) indicate the positions of odd primes in the sequence [n, floor(n/2), floor(n/4), ..., 1].

Crossrefs

Cf. also A292599 (variant for all primes).

Formula

a(1) = a(2) = 0; for n > 2, a(n) = A010051(n) + 2*a(floor(n/2)).
Other identities. For all n >= 1:
a(n) + A292597(n) = n.
A000120(a(n)) = A292598(n).
A007814(1+a(n)) <= A007814(1+n).

A292599 a(1) = 0; for n > 1, a(n) = A010051(n) + 2*a(floor(n/2)).

Original entry on oeis.org

0, 1, 1, 2, 3, 2, 3, 4, 4, 6, 7, 4, 5, 6, 6, 8, 9, 8, 9, 12, 12, 14, 15, 8, 8, 10, 10, 12, 13, 12, 13, 16, 16, 18, 18, 16, 17, 18, 18, 24, 25, 24, 25, 28, 28, 30, 31, 16, 16, 16, 16, 20, 21, 20, 20, 24, 24, 26, 27, 24, 25, 26, 26, 32, 32, 32, 33, 36, 36, 36, 37, 32, 33, 34, 34, 36, 36, 36, 37, 48, 48, 50, 51, 48, 48, 50, 50, 56, 57, 56, 56, 60, 60, 62, 62, 32
Offset: 1

Views

Author

Antti Karttunen, Sep 27 2017

Keywords

Comments

1-bits in base-2 expansion of a(n) indicate the positions of primes in the sequence [n, floor(n/2), floor(n/4), ..., 1].

Crossrefs

Cf. also A292596 (variant for odd primes).

Programs

  • Maple
    A292599 := proc(n)
        option remember;
        if n = 1 then
            0 ;
        else
            A010051(n) + 2*procname(floor(n/2)) ;
        end if;
    end proc:
    seq(A292599(n),n=1..100) ; # R. J. Mathar, Sep 28 2017
  • Mathematica
    a[1] = 0; a[n_] := a[n] = Boole[PrimeQ[n]] + 2*a[Floor[n/2]]; Array[a, 96] (* Jean-François Alcover, Sep 29 2017 *)

Formula

a(1) = 0; for n > 1, a(n) = A010051(n) + 2*a(floor(n/2)).
Other identities. For all n >= 1:
A000120(a(n)) = A078349(n).
A007814(1+a(n)) = A292936(n).

A317939 Numerators of sequence whose Dirichlet convolution with itself yields A080339 = A010051 (characteristic function of primes) + A063524 (1, 0, 0, 0, ...).

Original entry on oeis.org

1, 1, 1, -1, 1, -1, 1, 1, -1, -1, 1, 3, 1, -1, -1, -5, 1, 3, 1, 3, -1, -1, 1, -5, -1, -1, 1, 3, 1, 3, 1, 7, -1, -1, -1, -15, 1, -1, -1, -5, 1, 3, 1, 3, 3, -1, 1, 35, -1, 3, -1, 3, 1, -5, -1, -5, -1, -1, 1, -15, 1, -1, 3, -21, -1, 3, 1, 3, -1, 3, 1, 35, 1, -1, 3, 3, -1, 3, 1, 35, -5, -1, 1, -15, -1, -1, -1, -5, 1, -15, -1, 3, -1, -1, -1, -63, 1, 3, 3
Offset: 1

Views

Author

Antti Karttunen, Aug 14 2018

Keywords

Crossrefs

Cf. A010051, A080339, A046644 (denominators).

Programs

  • PARI
    up_to = 65537;
    DirSqrt(v) = {my(n=#v, u=vector(n)); u[1]=1; for(n=2, n, u[n]=(v[n]/v[1] - sumdiv(n, d, if(d>1&&dA317937.
    v317939aux = DirSqrt(vector(up_to, n, if(1==n,1,isprime(n))));
    A317939(n) = numerator(v317939aux[n]);

Formula

a(n) = numerator of f(n), where f(1) = 1, f(n) = (1/2) * (A010051(n) - Sum_{d|n, d>1, d 1.

A280417 Number of distinct length-n blocks (a.k.a. subword complexity) of the characteristic sequence of the prime numbers A010051.

Original entry on oeis.org

1, 2, 4, 7, 9, 13, 16, 22, 28, 38, 48, 62, 76, 104, 132, 174, 216, 273, 330, 435, 540, 700, 860
Offset: 0

Views

Author

Jeffrey Shallit, Jan 02 2017

Keywords

Comments

Unlike A023192, this sequence also counts blocks that occur finitely often in A010051. And unlike A023192, the correctness of the numbers provided here depend on no conjecture.

Examples

			For n = 4, the 9 blocks (in the order they occur in A010051) are 0110,1101,1010,0101,0100,1000,0001,0010,0000.
		

Crossrefs

Cf. A010051, A023192. A280418 gives the length of shortest prefix needed to get all blocks that occur.
Showing 1-10 of 1222 results. Next