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

A087631 Number of n-digit primes ending in 3 in base 10.

Original entry on oeis.org

1, 6, 35, 268, 2092, 17263, 146565, 1274244, 11272025, 101053126, 915743823, 8372470456, 77114448042
Offset: 1

Views

Author

Meenakshi Srikanth (menakan_s(AT)yahoo.com) and Amarnath Murthy, Sep 15 2003

Keywords

Examples

			a(2) = 6, as there exist 6 two-digit prime numbers (13, 23, 43, 53, 73, and 83) with units place 3.
a(3) = 35, since there are 35 three-digit numbers with units place digit as 3.
		

Crossrefs

Programs

  • Java
    /** The terms of the sequences are generated by changing the range for j for the various numbers of digits. E.g., it ranges from 100 to 999 for three-digit numbers. */
    float r, x;
    int c = 0, count = 0;
    for (float j = 100f; j < 1000f; j++) { for (float i = 2f; i < j; i++) { r = j % i; if (r == 0) c = 1; } if (c == 0) { x = j % 10; if (x == 3) count = count + 1; } c = 0; } System.out.println("count = " + count);
    
  • Mathematica
    Table[Length[Select[Range[10^n + 3, 10^(n + 1) - 7, 10], PrimeQ[#] &]], {n, 5}] (* Alonso del Arte, Apr 27 2014 *)
  • PARI
    a(n) = my(c=0); forprime(p=10^(n-1), 10^n, if(p%10==3, c++)); c \\ Iain Fox, Aug 07 2018

Formula

From Iain Fox, Aug 07 2018: (Start)
a(n) ~ (1/4) * Integral_{x=10^(n-1)..10^n} (dx/log(x)).
a(n) = A006879(n) - A087630(n) - A087632(n) - A087633(n), for n > 1.
(End)

Extensions

More terms from Ray Chandler, Oct 04 2003
Offset corrected by Iain Fox, Aug 07 2018
a(11) from Iain Fox, Aug 07 2018
a(12)-a(13) from Giovanni Resta, Aug 07 2018

A087632 Number of n-digit primes ending in 7 in base 10.

Original entry on oeis.org

1, 5, 40, 262, 2103, 17210, 146590, 1274284, 11271819, 101051725, 915754298, 8372478663, 77114370790
Offset: 1

Views

Author

Meenakshi Srikanth (menakan_s(AT)yahoo.com) and Amarnath Murthy, Sep 15 2003

Keywords

Examples

			a(2) = 5 as there exist 5 two-digit prime numbers (17, 37, 47, 67, and 97) with units place 7.
a(3) = 40, since there are 40 three-digit numbers with units place digit as 7.
		

Crossrefs

Programs

  • Java
    /** The terms of the sequences are generated by changing the range for j for the various numbers of digits. E.g., it ranges from 100 to 999 for three-digit numbers. */
    float r, x;
    int c = 0, count = 0;
    for (float j = 100f; j < 1000f; j++) { for (float i = 2f; i < j; i++) { r = j % i; if (r == 0) c = 1; } if (c == 0) { x = j % 10; if (x == 7) count = count + 1; } c = 0; } System.out.println("count = " + count);
    
  • Mathematica
    Table[Length[Select[Range[10^n + 7, 10^(n + 1) - 3, 10], PrimeQ[#] &]], {n, 5}] (* Alonso del Arte, Apr 27 2014 *)
  • PARI
    a(n) = my(c=0); forprime(p=10^(n-1), 10^n, if(p%10==7, c++)); c \\ Iain Fox, Aug 07 2018

Formula

From Iain Fox, Aug 07 2018: (Start)
a(n) ~ (1/4) * Integral_{x=10^(n-1)..10^n} (dx/log(x)).
a(n) = A006879(n) - A087630(n) - A087631(n) - A087633(n), for n > 1.
(End)

Extensions

More terms from Ray Chandler, Oct 04 2003
Offset corrected by Iain Fox, Aug 07 2018
a(11) from Iain Fox, Aug 07 2018
a(12)-a(13) from Giovanni Resta, Aug 07 2018

A087633 Number of n-digit primes ending in 9 in base 10.

Original entry on oeis.org

0, 5, 33, 265, 2087, 17203, 146439, 1274154, 11271147, 101049993, 915748570, 8372464236, 77114396969
Offset: 1

Views

Author

Meenakshi Srikanth (menakan_s(AT)yahoo.com) and Amarnath Murthy, Sep 15 2003

Keywords

Examples

			a(2) = 5 as there exist 5 two-digit prime numbers (19, 29, 59, 79, and 89) with units place 9.
a(3) = 33, since there are 33 three-digit numbers with units place digit as 9.
		

Crossrefs

Programs

  • Java
    /** The terms of the sequences are generated by changing the range for j for the various numbers of digits. E.g., it ranges from 100 to 999 for three-digit numbers. */
    float r, x;
    int c = 0, count = 0; for (float j = 100f; j < 1000f; j++) { for (float i = 2f; i < j; i++) { r = j % i; if (r == 0) c = 1; } if (c == 0) { x = j % 10; if (x == 9) count = count + 1; } c = 0; } System.out.println("count = " + count);
    
  • Mathematica
    Table[Length[Select[Range[10^n + 9, 10^(n + 1) - 1, 10], PrimeQ]], {n, 5}] (* Alonso del Arte, Apr 27 2014 *)
  • PARI
    a(n) = my(c=0); forprime(p=10^(n-1), 10^n, if(p%10==9, c++)); c \\ Iain Fox, Aug 07 2018

Formula

From Iain Fox, Aug 07 2018: (Start)
a(n) ~ (1/4) * Integral_{x=10^(n-1)..10^n} (dx/log(x)).
a(n) = A006879(n) - A087630(n) - A087631(n) - A087632(n), for n > 1.
(End)

Extensions

Corrected and extended by Ray Chandler, Oct 04 2003
Offset corrected by Iain Fox, Aug 07 2018
a(11) from Iain Fox, Aug 07 2018
a(12)-a(13) from Giovanni Resta, Aug 07 2018

A228113 First differences of A057793.

Original entry on oeis.org

5, 21, 142, 1059, 8360, 68940, 586140, 5096885, 45085903, 404203228, 3663001812, 33489858047, 308457620524, 2858876200536, 26639628764285, 249393770865090, 2344318815695001, 22116397127183516, 209317713015989446, 1986761935255798075, 18906449883376272709
Offset: 1

Views

Author

Vladimir Pletser, Aug 10 2013

Keywords

Comments

This sequence is an approximation to the number of primes with n digits (A006879). The error in the approximation is tabulated in A228114.
Because A057793(n) = Riemann(10^n) is not defined for n=0, we set its value to zero for our purpose of defining the differences.

Examples

			For n=1, A057793(1) - A057793(0) = 5 - 0 = 5.
		

References

  • John H. Conway and R. K. Guy, "The Book of Numbers," Copernicus, an imprint of Springer-Verlag, NY, 1996, page 144-146.

Crossrefs

Formula

a(n) = A057793(n) - A057793(n-1).

A309329 Median of primes with n decimal digits.

Original entry on oeis.org

4, 47, 509, 5273, 53047, 532887, 5356259, 53765483, 539119753, 5402600081, 54118210435, 541947386821, 5425907665571, 54313871643797, 543611236251491, 5440228524355329, 54438462600610510, 544705097744731559, 5449909581264135103
Offset: 1

Views

Author

Hugo Pfoertner, Jul 25 2019

Keywords

Comments

The number of n-digit primes < a(n) equals the number of n-digit primes > a(n). The median of an even number of values is understood to be defined as the arithmetic mean of the two central elements.

Examples

			a(1) = 4 because {2, 3, 5, 7} are the 4 one-digit primes. The 2 central elements of the sorted list are 3 and 5. 4 = (3 + 5)/2.
a(2) = 47 because it is the central element of the sorted list of the A006879(2) = 21 two-digit primes. There are 10 such primes < 47 and 10 such primes > 47.
		

Crossrefs

Formula

a(n) = (prime(A006880(n-1) + ceiling(A006879(n)/2)) + prime(A006880(n-1) + floor(A006879(n)/2) + 1)) / 2.

A087434 Number of brilliant numbers whose prime factors each have n digits.

Original entry on oeis.org

10, 231, 10296, 563391, 34974066, 2374052871, 171745762321, 12989075028126, 1016377282340160, 81690831917887753, 6708792934060150753, 560785267822390134615, 47573053155260626453431
Offset: 1

Views

Author

Ray Chandler, Sep 02 2003

Keywords

Comments

Number of brilliant numbers having 2n or 2n-1 digits.

Crossrefs

Programs

Formula

a(n)=A000217(A006879(n)).

Extensions

a(14) from Ray Chandler, Jul 21 2005

A120120 Number of n-digit prime quadruplets.

Original entry on oeis.org

1, 3, 7, 26, 128, 733, 3869, 23620, 152141, 1028789, 7188960, 51672312, 381226246, 2873279651
Offset: 2

Views

Author

Julien Peter Benney (jpbenney(AT)ftml.net), Aug 15 2006, Aug 19 2006

Keywords

Examples

			a(3) = 3 because there are three three-digit prime quadruples: {101, 103, 107, 109}, {191, 193, 197, 199} and {821, 823, 827, 829}.
		

Crossrefs

Extensions

a(6) corrected and a(15) supplied by Jon E. Schoenfield, Aug 27 2006

A178701 An irregular array read by rows. The k-th entry of row r is the number of r-digit primes with digit sum k.

Original entry on oeis.org

1, 0, 1, 1, 0, 1, 2, 2, 2, 3, 3, 3, 1, 1, 2, 1, 1, 2, 4, 7, 7, 12, 13, 16, 16, 13, 18, 12, 11, 6, 4, 1, 0, 0, 4, 8, 20, 19, 31, 52, 67, 77, 93, 101, 116, 95, 92, 91, 63, 51, 29, 30, 16, 5, 0, 1, 0, 4, 12, 28, 45, 95, 143, 236, 272, 411, 479, 630, 664, 742, 757, 741, 706, 580, 528, 379, 341, 205, 166, 84, 62, 34, 13, 4, 2, 0, 2, 14, 58, 76, 204, 389, 660, 852, 1448, 1971, 2832, 3101, 4064, 4651, 5393, 5376, 5570, 5785, 5287, 4796
Offset: 1

Views

Author

Robert G. Wilson v, Dec 29 2010

Keywords

Comments

Each row, r, has 6r-1 terms. The first row does not account for the prime 3 and its count of 1.

Examples

			To begin the second row, only 11 has digit-sum 2, so the first term is 1; both 13 & 31 have digit-sum 4 so the second term is 2; both 23 & 41 have digit-sum 5, so the third term is 2; etc.
To begin the third row, only 101 -> 2, so its first term is 1, both 103 & 211 -> 4 so its second term is 2; 113, 131, 311 & 401 -> 5, so its third term is 4; etc.
  \k 2, 4,  5,  7,  8,  10,  11,  13,  14,   16,   17,   19,   20,   22,   23,   25,   26, ...
  r\
  1: 1, 0,  1,  1,  0;
  2: 1, 2,  2,  2,  3,   3,   3,   1,   1,    2,    1;
  3: 1, 2,  4,  7,  7,  12,  13,  16,  16,   13,   18,   12,   11,    6,    4,    1,    0;
  4: 0, 4,  8, 20, 19,  31,  52,  67,  77,   93,  101,  116,   95,   92,   91,   63,   51, ...
  5: 0, 4, 12, 28, 45,  95, 143, 236, 272,  411,  479,  630,  664,  742,  757,  741,  706, ...
  6: 0, 2, 14, 58, 76, 204, 389, 660, 852, 1448, 1971, 2832, 3101, 4064, 4651, 5393, 5376, ...
etc.
		

Crossrefs

Row sums (except for the first term) give A006879. The indices k are given by A001651 (beginning with 2).

Programs

  • Mathematica
    dir[n_] := Floor[(3 n + 2)/2]; inv[n_] := Floor[(2 n - 1)/3]; f[n_] := Block[{p = NextPrime[10^(n - 1)], t = Table[0, {inv[9 n]}]}, While[p < 10^n, t[[ inv[Plus @@ IntegerDigits@ p]]]++; p = NextPrime@ p]; t]; Array[f, 5] // Flatten

A228063 Integer nearest to F[4n](S(n)), where F[4n](x) are Fibonacci polynomials and S(n) = Sum_{i=0..3} (C(i)*(log(log(A*(B+n^2))))^i) (see coefficients A, B, C(i) in comments).

Original entry on oeis.org

4, 21, 143, 1063, 8371, 68785, 583436, 5069633, 44876757, 403025174, 3660702622, 33550877248, 309726969451, 2876065468123, 26835315229835, 251389798269317, 2362887262236150, 22272676889496853, 210455460654786509, 1992806263723883464
Offset: 1

Views

Author

Vladimir Pletser, Aug 06 2013

Keywords

Comments

Coefficients are A=6.74100517717340111e-03, B=147.60482223254, C(0)=1.112640536670862472, C(1)=5.2280866355335360415e-02, C(2)=0, C(3)=-1.5569578292261924e-03.
This sequence gives a good approximation of the number of primes with n digits (A006879); see A228064.
As the squares of odd-indexed Fibonacci numbers F[2n+1](1) (see A227693) are equal or close to the first values of pi(10^n) (A006880), and as F[4n](1)=(F[2n+1](1))^2- (F[2n-1](1))^2, it is legitimate to ask whether the first values of the differences pi(10^n)- pi(10^(n-1)) (A006879) are also close or equal to multiple of 4 index Fibonacci numbers F[4n](1); e.g., for n=2, F[8](1)=21.
To obtain this sequence, one switches to multiple of 4 index Fibonacci polynomials F[4n](x), one obtains the sequence a(n) by computing x as a function of n such that F[4n](x) fit the values of pi(10^n)- pi(10^(n-1)) for 1 <= n <= 25, with pi(1)=0.

Examples

			For n =1, F[4](x) = x^3+2x; replace x by Sum_{i=0..3} (C(i)*(log(log(A*(B+1))))^i)= 1.179499… to obtain a(1)= round(F[4]( 1.179499...))=4. For n=2, F[8](x) = x^7+6x^5+10x^3+4x; replace x by Sum_{i=0..3} (C(i)*(log(log(A*(B+4))))^i)= 0.999861... to obtain a(2)= round(F[8]( 0.999861…))=21
		

References

  • Jonathan Borwein, David H. Bailey, Mathematics by Experiment, A. K. Peters, 2004, p. 65 (Table 2.2).
  • John H. Conway and R. K. Guy, The Book of Numbers, Copernicus, an imprint of Springer-Verlag, NY, 1996, page 144.

Crossrefs

Programs

  • Maple
    with(combinat):A:=6.74100517717340111e-03: B:=147.60482223254: C(0):=1.112640536670862472: C(1):=5.2280866355335360415e-02: C(2):=0: C(3):=-1.5569578292261924e-03: b:=n->log(log(A*(B+n^2))): c:=n->sum(C(i)*(b(n))^i, i=0..3): seq(round(fibonacci(4*n, c(n))), n=1..25);

Formula

a(n) = round(F[4n](Sum_{i=0..3} (C(i)*(log(log(A*(B+n^2))))^i)) ).

A228065 Difference of consecutive integers nearest to (10^n)/log(10^n) (A057834).

Original entry on oeis.org

4, 18, 123, 941, 7600, 63696, 548039, 4808260, 42826261, 386039540, 3513837172, 32243075171, 297881471562, 2768030763779, 25850862018051, 242481085729315, 2283239371770773, 21572797793887019, 204448571890127322, 1942896366409284492
Offset: 1

Views

Author

Vladimir Pletser, Aug 06 2013

Keywords

Comments

This sequence gives an approximation of the number of primes with n digits (A006879); see A228066.
Note that A057834(n) = (10^n)/log(10^n) is not defined for n=0. Its value is set arbitrarily to 0.

Examples

			For n = 1, A057834(1) - A057834(0) = 4-0 = 4.
		

Crossrefs

Formula

a(n) = A057834(n) - A057834(n-1).
Previous Showing 21-30 of 50 results. Next