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 11-20 of 49 results. Next

A005145 n copies of n-th prime.

Original entry on oeis.org

2, 3, 3, 5, 5, 5, 7, 7, 7, 7, 11, 11, 11, 11, 11, 13, 13, 13, 13, 13, 13, 17, 17, 17, 17, 17, 17, 17, 19, 19, 19, 19, 19, 19, 19, 19, 23, 23, 23, 23, 23, 23, 23, 23, 23, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31, 31
Offset: 1

Views

Author

Keywords

Comments

Seen as a triangle read by rows: T(n,k) = A000040(n), 1 <= k <= n; row sums = A033286; central terms = A031368. - Reinhard Zumkeller, Aug 05 2009
Seen as a square array read by antidiagonals, a subtable of the binary operation multiplication tables A297845, A306697 and A329329. - Peter Munn, Jan 15 2020

Examples

			Triangle begins:
  2;
  3, 3;
  5, 5, 5;
  7, 7, 7, 7;
  ...
		

References

  • Douglas Hofstadter, "Fluid Concepts and Creative Analogies: Computer Models of the Fundamental Mechanisms of Thought", Basic Books, 1995.

Crossrefs

Sequences with similar definitions: A002024, A175944.
Cf. A000040 (range of values), A003961, A031368 (main diagonal), A033286 (row sums), A097906.
Subtable of A297845, A306697, A329329.

Programs

  • Haskell
    a005145 n k = a005145_tabl !! (n-1) !! (k-1)
    a005145_row n = a005145_tabl !! (n-1)
    a005145_tabl = zipWith ($) (map replicate [1..]) a000040_list
    a005145_list = concat a005145_tabl
    -- Reinhard Zumkeller, Jul 12 2014, Mar 18 2011, Oct 17 2010
    
  • Magma
    [NthPrime(Round(Sqrt(2*n))): n in [1..60]]; // Vincenzo Librandi, Jan 18 2020
    
  • Mathematica
    Table[Prime[Floor[1/2 + Sqrt[2*n]]], {n, 1, 80}] (* Joseph Biberstine (jrbibers(AT)indiana.edu), Aug 14 2006 *)
    Flatten[Table[Table[Prime[n], {n}], {n, 12}]] (* Alonso del Arte, Jan 18 2012 *)
    Table[PadRight[{},n,Prime[n]],{n,15}]//Flatten (* Harvey P. Dale, Feb 29 2024 *)
  • PARI
    a(n) = prime(round(sqrt(2*n))) \\ Charles R Greathouse IV, Oct 23 2015
    
  • Python
    from sympy import primerange
    a = []; [a.extend([pn]*n) for n, pn in enumerate(primerange(1, 32), 1)]
    print(a) # Michael S. Branicky, Jul 13 2022
    
  • Python
    from math import isqrt
    from sympy import prime
    def A005145(n): return prime(isqrt(n<<3)+1>>1) # Chai Wah Wu, Jun 08 2025

Formula

From Joseph Biberstine (jrbibers(AT)indiana.edu), Aug 14 2006: (Start)
a(n) = prime(floor(1/2 + sqrt(2*n))).
a(n) = A000040(A002024(n)). (End)
From Peter Munn, Jan 15 2020: (Start)
When viewed as a square array A(n,k), the following hold for n >= 1, k >= 1:
A(n,k) = prime(n+k-1).
A(n,1) = A(1,n) = prime(n), where prime(n) = A000040(n).
A(n+1,k) = A(n,k+1) = A003961(A(n,k)).
A(n,k) = A297845(A(n,1), A(1,k)) = A306697(A(n,1), A(1,k)) = A329329(A(n,1), A(1,k)).
(End)
Sum_{n>=1} 1/a(n)^2 = A097906. - Amiram Eldar, Aug 16 2022

A125624 Array read by antidiagonals: n-th row contains the positive integers with their largest prime factor equal to the n-th prime.

Original entry on oeis.org

2, 3, 4, 5, 6, 8, 7, 10, 9, 16, 11, 14, 15, 12, 32, 13, 22, 21, 20, 18, 64, 17, 26, 33, 28, 25, 24, 128, 19, 34, 39, 44, 35, 30, 27, 256, 23, 38, 51, 52, 55, 42, 40, 36, 512, 29, 46, 57, 68, 65, 66, 49, 45, 48, 1024, 31, 58, 69, 76, 85, 78, 77, 56, 50, 54, 2048, 37, 62, 87, 92
Offset: 1

Views

Author

Leroy Quet, Jan 27 2007

Keywords

Comments

This sequence is a permutation of the integers >= 2.
Since the table has been entered by rising instead of falling antidiagonals, the sequence represents the transpose, with columns instead of rows: cf. the "table" link, section "infinite square array". - M. F. Hasler, Oct 22 2019
Start with table headed by primes in the first row, then list beneath each prime(k) the ordered prime(k)-smooth numbers. Read the table by falling antidiagonals to get the terms of this sequence. - David James Sycamore, Jun 23 2024

Examples

			Array begins: (rows here appear as columns in the "table" display of the sequence)
   2,  4,  8, 16, 32, 64, 128, 256, 512, ... (A000079)
   3,  6,  9, 12, 18, 24,  27,  36,  48, ... (A065119)
   5, 10, 15, 20, 25, 30,  40,  45,  50, ... (A080193)
   7, 14, 21, 28, 35, 42,  49,  56,  63, ... (A080194)
  11, 22, 33, 44, 55, 66,  77,  88,  99, ... (A080195)
  13, 26, 39, 52, 65, 78,  91, 104, 117, ... (A080196)
The 3rd row, for example, contains the positive integers where the 3rd prime, 5, is the largest prime divisor. That is, each integer in this row is divisible by 5 and may be divisible by 2 or 3 as well, but none of the integers in this row are divisible by primes larger than 5. (So for example, 35 = 5*7 is excluded from the 3rd row.)
		

Crossrefs

Programs

  • Mathematica
    lpf[n_] := FactorInteger[n][[ -1, 1]];f[n_, m_] := f[n, m] = Block[{k},k = If[m == 1, Prime[n], f[n, m - 1] + 1];While[lpf[k] != Prime[n], k++ ];k];Table[f[ d - m + 1, m], {d, 12}, {m, d}] // Flatten (* Ray Chandler, Feb 09 2007 *)
  • PARI
    T=List(); r=c=1; for(n=1,99, #TT[r][1], ); print1(T[r][c]","); r-- && c++ || r=c+c=1) \\ M. F. Hasler, Oct 22 2019

Extensions

Extended by Ray Chandler, Feb 09 2007

A057855 Greatest k such that (k-th prime) <= (n times n-th prime).

Original entry on oeis.org

1, 3, 6, 9, 16, 21, 30, 36, 46, 61, 68, 86, 99, 110, 126, 146, 168, 184, 205, 223, 242, 270, 292, 321, 360, 381, 404, 429, 446, 477, 546, 574, 614, 637, 693, 717, 762, 804, 842, 890, 935, 965, 1029, 1059, 1105, 1134, 1222, 1304, 1348, 1381, 1423, 1483
Offset: 1

Views

Author

Henry Bottomley, Nov 13 2000

Keywords

Comments

Might be roughly n^2/2 (seems to be marginally more at least for small n).

Examples

			a(4)=9 since 4th prime is 7, 4*7=28, greatest prime less than or equal to 28 is 23 which is the 9th prime.
		

Crossrefs

Cf. A020900, A020901, A020934-A020940, A033286 (n*prime(n)).

Programs

  • Maple
    a:= n-> numtheory[pi](n*ithprime(n)):
    seq(a(n), n=1..61);  # Alois P. Heinz, Aug 30 2019
  • Mathematica
    Table[PrimePi[w*Prime[w]], {w, 1, 100}]
  • PARI
    a(n) = primepi(n*prime(n)); \\ Michel Marcus, Aug 30 2019

Formula

a(n) = pi(n*prime(n)).

A117495 Product of a prime number p and the number of primes smaller than p.

Original entry on oeis.org

0, 3, 10, 21, 44, 65, 102, 133, 184, 261, 310, 407, 492, 559, 658, 795, 944, 1037, 1206, 1349, 1460, 1659, 1826, 2047, 2328, 2525, 2678, 2889, 3052, 3277, 3810, 4061, 4384, 4587, 5066, 5285, 5652, 6031, 6346, 6747, 7160, 7421, 8022, 8299, 8668, 8955, 9706
Offset: 1

Views

Author

Luc Stevens (lms022(AT)yahoo.com), Apr 25 2006

Keywords

Examples

			a(9) = 184 because (1) the 9th prime number is 23, (2) there are 8 primes smaller than 23 and (3) 23*8 = 184.
		

Crossrefs

Programs

  • Maple
    with(numtheory):a:=n->sum(ithprime(n), j=2..n):seq(a(n), n=1..47); # Zerinvary Lajos, Aug 24 2008
  • Mathematica
    Table[(n - 1)Prime[n], {n, 60}] (* Zak Seidov, Aug 15 2010 *)
  • PARI
    a(n)=prime(n)*(n-1) \\ Charles R Greathouse IV, Sep 15 2014

Formula

a(n) = (n-1)*prime(n). - Zak Seidov, Aug 15 2010

Extensions

a(31) corrected by Jens Kruse Andersen, Sep 15 2014

A124012 Decimal expansion of Sum_{k>=1} 1/(k*prime(k)).

Original entry on oeis.org

8, 4, 8, 9, 6, 9, 0, 3, 4, 0, 4, 3
Offset: 0

Views

Author

Pierre CAMI, Nov 02 2006

Keywords

Comments

From Robert Price, Jul 14 2010: (Start)
This series converges very slowly. I could not find any transform that converges faster, so I did this by brute force using 256 bits of precision.
After k=596765000000 terms (p(k)=17581469834441) the partial sum is 0.848 969 034 043 245 206 069 544 346 415 327 714...
The next two digits are either 29 or 30. (End)
The table in the Example section shows, for increasing values of j, the results of computing the partial sum s(j) = Sum_{k=1..j} 1/(k*prime(k)) and adding to it an approximate value for the tail (i.e., the sum for all the terms k > j). See the Links entry for an explanation of the method used in approximating the size of the tail of the summation beyond the j-th prime. - Jon E. Schoenfield, Jan 20 2019

Examples

			0.848969034043...
From _Jon E. Schoenfield_, Jan 14 2019: (Start)
We can obtain prime(2^d) for d = 0..57 from the b-file for A033844. Given the above result from _Robert Price_, and letting j_RP = 596765000000, the partial sum through
   prime(j_RP) = 17581469834441
is
   s(j_RP) = Sum_{k=1..j_RP} 1/(k*prime(k))
           = 0.848969034043245206069544346415327714...;
adding to this actual partial sum s(j_RP) the approximate tail value
   t(j_RP) =
         h'(prime(j_RP), prime(2^40))
       + (Sum_{d=41..57} h'(prime(2^(d-1)), prime(2^d)))
       + lim_{x->infinity} h(prime(2^57), x)
(see the Links entry for an explanation) gives the result 0.84896903404330021273712255895762255... (which seems likely to be correct to at least 20 significant digits).
The table below gives, for j = 2^16, 2^17, ..., 2^32, and j_RP, the actual partial sum s(j) and the sum s(j) + t(j) where t(j) is the approximate tail value beyond prime(j).
.
   j             s(j)                s(j) + t(j)
  ====  ======================  ======================
  2^16  0.84896790758922908159  0.84896903393397518971
  2^17  0.84896850050492294891  0.84896903400552099072
  2^18  0.84896878057566843770  0.84896903404214147367
  2^19  0.84896891330602605081  0.84896903404317536927
  2^20  0.84896897639243509768  0.84896903404350431035
  2^21  0.84896900645590169648  0.84896903404376063663
  2^22  0.84896902081581006534  0.84896903404343742139
  2^23  0.84896902768965496764  0.84896903404337393698
  2^24  0.84896903098637626311  0.84896903404331189996
  2^25  0.84896903257029535468  0.84896903404329806633
  2^26  0.84896903333252861584  0.84896903404330030271
  2^27  0.84896903369988697984  0.84896903404330084536
  2^28  0.84896903387717904236  0.84896903404330042023
  2^29  0.84896903396285181513  0.84896903404330024036
  2^30  0.84896903400430044877  0.84896903404330021861
  2^31  0.84896903402437548991  0.84896903404330021472
  2^32  0.84896903403410856545  0.84896903404330021655
  ...            ...                     ...
  j_RP  0.84896903404324520607  0.84896903404330021274
(End)
		

Crossrefs

Extensions

Offset and leading zero corrected by R. J. Mathar, Jan 31 2009
Four more terms (4,0,4,3) from Robert Price, Jul 14 2010
Title and example edited by M. F. Hasler, Jan 13 2015

A272173 Product of the sum of the divisors of n and the sum of the divisors of n-th prime.

Original entry on oeis.org

3, 12, 24, 56, 72, 168, 144, 300, 312, 540, 384, 1064, 588, 1056, 1152, 1674, 1080, 2418, 1360, 3024, 2368, 2880, 2016, 5400, 3038, 4284, 4160, 6048, 3300, 8208, 4096, 8316, 6624, 7560, 7200, 13832, 6004, 9840, 9408, 15660, 7560, 17472, 8448, 16296, 15444, 14400, 10176, 27776
Offset: 1

Views

Author

Omar E. Pol, Apr 26 2016

Keywords

Comments

Numbers that occur twice in the sequence include 7560, 816000, 2709504, 31752000. Are there infinitely many? Does any number occur more than twice? - Robert Israel, Sep 12 2018

Examples

			For n = 9 the sum of the divisors of 9 is 1 + 3 + 9 = 13, and the 9th prime is 23, and the sum of the divisors of 23 is 1 + 23 = 24, and 13*24 = 312, so a(9) = 312.
On the other hand 9*23 = 207, and the sum of the divisors of 207 is 1 + 3 + 9 + 23 + 69 + 207 = 312, so a(9) = 312.
		

Crossrefs

Programs

  • Magma
    [SumOfDivisors(n)*SumOfDivisors(NthPrime(n)): n in [1..50]]; // Vincenzo Librandi, Sep 13 2018
  • Maple
    f:= n -> numtheory:-sigma(n)*(1+ithprime(n)):
    map(f, [$1..100]); # Robert Israel, Sep 12 2018
  • Mathematica
    Table[DivisorSigma[1, n]*DivisorSigma[1, Prime[n]], {n, 1, 50}] (* G. C. Greubel, Apr 27 2016 *)
  • PARI
    a(n) = sigma(n)*sigma(prime(n)); \\ Michel Marcus, Apr 27 2016
    

Formula

a(n) = sigma(n)*sigma(prime(n)) = sigma(n)*(1 + prime(n)) = A000203(n)*(1 + A000040(n)) = A000203(n)*A008864(n).
a(n) = sigma(n*prime(n)) = A000203(n*A000040(n)) = A000203(A033286(n)).
a(n) = A000203(n) + A272211(n).

A080697 a(n) = n * prime(prime(n)).

Original entry on oeis.org

3, 10, 33, 68, 155, 246, 413, 536, 747, 1090, 1397, 1884, 2327, 2674, 3165, 3856, 4709, 5094, 6289, 7060, 7707, 8822, 9913, 11064, 12725, 14222, 15201, 16436, 17371, 18510, 21979, 23648, 25509, 27098, 30065, 31572, 34003, 36746, 38649, 41240
Offset: 1

Views

Author

Cino Hilliard, Mar 04 2003

Keywords

Comments

Previous name was: "Product of prime-index-primes and the index of their prime index".
Sum of reciprocals converges to about 1/2. [More accurately, 0.50056748... . - Amiram Eldar, Jul 13 2024]

Examples

			a(1) = 1*prime(prime(1)) = 1*prime(2) = 1*3 = 3.
a(2) = 2*prime(prime(2)) = 2*prime(3) = 2*5 = 10.
		

Crossrefs

Programs

  • Magma
    [n*NthPrime(NthPrime(n)): n in [1..40]]; // Vincenzo Librandi, Jun 09 2016
  • Mathematica
    Table[n Prime[Prime[n]], {n, 1, 40}] (* Vincenzo Librandi, Jun 09 2016 *)
  • PARI
    pipxindex(n) = {sr=0; pr=1; for(x=1,n, y=prime(prime(x)); pr=x*y; print1(pr" "); sr+=1.0/pr; ); print(); print(sr) }
    

Formula

a(n) = n*A006450(n). - Omar E. Pol, Oct 21 2013

Extensions

New name from Omar E. Pol, Oct 21 2013

A306192 a(n) = (n - 1)*prime(n + 1).

Original entry on oeis.org

0, 5, 14, 33, 52, 85, 114, 161, 232, 279, 370, 451, 516, 611, 742, 885, 976, 1139, 1278, 1387, 1580, 1743, 1958, 2231, 2424, 2575, 2782, 2943, 3164, 3683, 3930, 4247, 4448, 4917, 5134, 5495, 5868, 6179, 6574, 6981, 7240, 7831, 8106, 8471, 8756, 9495, 10258
Offset: 1

Views

Author

Stefano Spezia, Jan 28 2019

Keywords

Comments

For n > 1, a(n) is the subdiagonal sum of the matrix M(n) whose determinant is A318173(n).

Crossrefs

Programs

  • Magma
    [(n-1)*NthPrime(n+1): n in [1..100]];
    
  • Maple
    a := n -> (n-1)*ithprime(n+1): seq(a(n), n = 1 .. 100);
  • Mathematica
    a[n_]:=(n-1)*Prime[n+1]; Array[a,100]
  • PARI
    a(n) = (n-1)*prime(n+1);
    
  • Python
    from sympy import prime
    [(n-1)*prime(n+1) for n in range(1,100)]

Formula

a(n) = A033286(n + 1) - 2*A000040(n + 1).
a(n) = (n - 1)/(n + 1)*A033286(n + 1).

A077320 Triangle in which n-th row contains n smallest multiples of the n-th prime.

Original entry on oeis.org

2, 3, 6, 5, 10, 15, 7, 14, 21, 28, 11, 22, 33, 44, 55, 13, 26, 39, 52, 65, 78, 17, 34, 51, 68, 85, 102, 119, 19, 38, 57, 76, 95, 114, 133, 152, 23, 46, 69, 92, 115, 138, 161, 184, 207, 29, 58, 87, 116, 145, 174, 203, 232, 261, 290
Offset: 1

Views

Author

Amarnath Murthy, Nov 04 2002

Keywords

Comments

0. A000040 (primes) gives initial terms of rows.
1. A033286 contains the final terms of rows.
2. Sum of the n-th row = prime(n)*A000217(n), by definition.
3. a(A000217(n) + 1) = prime(n+1), by definition.

Examples

			From _Bruno Berselli_, Sep 05 2017: (Start)
Triangle begins:
   2;
   3, 6;
   5, 10,  15;
   7, 14,  21,  28;
  11, 22,  33,  44,  55;
  13, 26,  39,  52,  65,  78;
  17, 34,  51,  68,  85, 102, 119;
  19, 38,  57,  76,  95, 114, 133, 152;
  23, 46,  69,  92, 115, 138, 161, 184, 207;
  29, 58,  87, 116, 145, 174, 203, 232, 261, 290;
  31, 62,  93, 124, 155, 186, 217, 248, 279, 310, 341;
  37, 74, 111, 148, 185, 222, 259, 296, 333, 370, 407, 444;
  41, 82, 123, 164, 205, 246, 287, 328, 369, 410, 451, 492, 533;
  43, 86, 129, 172, 215, 258, 301, 344, 387, 430, 473, 516, 559, 602, etc.
(End)
		

Crossrefs

Row sums give A196421. - Omar E. Pol, Mar 12 2012

Programs

  • Mathematica
    Table[Prime[n]*Range[n], {n, 10}] // Flatten (* Ivan Neretin, May 02 2019 *)

Formula

T(n,k) = k*prime(n) with 1 <= k <= n. - Bruno Berselli, Sep 05 2017

A084295 n is such that pi(n*prime(n))/n is an integer.

Original entry on oeis.org

1, 3, 47, 88, 200, 547, 12182, 15335, 39104, 58122, 73282, 150740, 480886
Offset: 1

Views

Author

Labos Elemer, May 27 2003

Keywords

Comments

a(9) > 30000. - Michel Marcus, Sep 02 2019
a(13) > 200000. - Giovanni Resta, Sep 02 2019

Crossrefs

Programs

  • Mathematica
    Do[s=PrimePi[n*Prime[n]]/n; If[IntegerQ[s], Print[n]], {n, 1, 100000}]
    Select[Range[16000],IntegerQ[PrimePi[#*Prime[#]]/#]&] (* Harvey P. Dale, Jul 23 2015 *)
  • PARI
    isok(n) = denominator(primepi(n*prime(n))/n) == 1; \\ Michel Marcus, Sep 02 2019

Extensions

Corrected by Harvey P. Dale, Jul 23 2015
a(9)-a(12) from Giovanni Resta, Sep 02 2019
a(13) from Chai Wah Wu, May 14 2020
Previous Showing 11-20 of 49 results. Next