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

A090942 n-th arithmetic mean = prime(n).

Original entry on oeis.org

2, 4, 9, 13, 27, 23, 41, 33, 55, 83, 51, 103, 89, 69, 103, 143, 155, 95, 175, 147, 113, 205, 171, 227, 289, 201, 155, 215, 165, 229, 547, 255, 329, 205, 489, 221, 373, 385, 319, 407, 419, 263, 611, 279, 373, 289, 763, 787, 419, 327, 433, 545, 345, 781, 581, 593
Offset: 1

Views

Author

Amarnath Murthy, Dec 29 2003

Keywords

Comments

Partial sums give A033286. - Omar E. Pol, Apr 20 2015
In other words, this is the unique sequence such that for all n >= 1, (1/n) * Sum_{k=1..n} a(k) = prime(n). - Antti Karttunen, Apr 30 2015

Examples

			From _Omar E. Pol_, Apr 20 2015: (Start)
Illustration of initial terms:
Consider a diagram in the first quadrant of the square grid in which the length of the n-th horizontal line segment is equal to the n-th prime, as shown below:
.   _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
.  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  51|
.  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _          83|   |
.  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _      55|           |   |
.  |_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _  33|       |           |   |
.  |_ _ _ _ _ _ _ _ _ _ _ _ _      41|   |       |           |   |
.  |_ _ _ _ _ _ _ _ _ _ _  23|       |   |       |           |   |
.  |_ _ _ _ _ _ _      27|   |       |   |       |           |   |
.  |_ _ _ _ _  13|       |   |       |   |       |           |   |
.  |_ _ _   9|   |       |   |       |   |       |           |   |
.  |_ _ 4|   |   |       |   |       |   |       |           |   |
.  |_2_|_|_ _|_ _|_ _ _ _|_ _|_ _ _ _|_ _|_ _ _ _|_ _ _ _ _ _|_ _|
.
a(n) is also the area (or the number of cells) in the n-th region of the diagram. For example: a(4) = 7 + 6 = 13.
(End)
		

Crossrefs

Programs

  • Magma
    [n le 1 select 2 else n*NthPrime(n) - (n-1)*NthPrime(n-1): n in [1..60]]; // G. C. Greubel, Feb 04 2019
    
  • Mathematica
    Table[If[n==1, 2, nPrime@n -(n-1)Prime[n-1]], {n, 60}] (* Michael De Vlieger, Apr 20 2015 *)
  • PARI
    vector(60, n, if(n==1,2, n*prime(n) -(n-1)*prime(n-1))) \\ G. C. Greubel, Feb 04 2019
    
  • Sage
    [2] + [n*nth_prime(n) - (n-1)*nth_prime(n-1) for n in (2..60)] # G. C. Greubel, Feb 04 2019

Formula

a(n) = n*prime(n) - (n-1)*prime(n-1).
a(n) = A033287(n-2), n>1. - R. J. Mathar, Sep 08 2008
a(n) = A000040(n) + A141042(n-1), n >=2. - Omar E. Pol, Apr 20 2015

Extensions

Corrected and extended by Ray Chandler, Dec 31 2003

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

Original entry on oeis.org

2, 9, 20, 49, 66, 156, 136, 285, 299, 522, 372, 1036, 574, 1032, 1128, 1643, 1062, 2379, 1340, 2982, 2336, 2844, 1992, 5340, 3007, 4242, 4120, 5992, 3270, 8136, 4064, 8253, 6576, 7506, 7152, 13741, 5966, 9780, 9352, 15570, 7518, 17376, 8404, 16212, 15366, 14328, 10128, 27652, 12939, 21297, 16776, 23422
Offset: 1

Views

Author

Omar E. Pol, Apr 26 2016

Keywords

Examples

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

Crossrefs

Main diagonal of A272214.

Programs

  • Mathematica
    Table[DivisorSigma[1, n]*Prime[n], {n, 1, 50}] (* G. C. Greubel, Apr 27 2016 *)
  • PARI
    a(n) = prime(n)*sigma(n); \\ Michel Marcus, Apr 27 2016

Formula

a(n) = prime(n)*sigma(n) = A000040(n)*A000203(n).
a(n) = sigma(n*prime(n)) - sigma(n) = A000203(n*A000040(n)) - A000203(n) = A000203(A033286(n)) - A000203(n) = A272173(n) - A000203(n).

A340128 a(n) = (n*prime(n)) mod prime(n+1).

Original entry on oeis.org

2, 1, 1, 6, 3, 10, 5, 14, 4, 11, 8, 34, 17, 38, 16, 22, 27, 26, 66, 33, 32, 78, 40, 2, 1, 51, 106, 53, 110, 88, 7, 82, 73, 107, 81, 98, 104, 15, 112, 118, 99, 153, 107, 21, 109, 81, 105, 35, 131, 33, 172, 137, 223, 190, 196, 202, 157, 206, 45, 163, 269, 53
Offset: 1

Views

Author

Simon Strandgaard, Jan 15 2021

Keywords

Examples

			a(1) = (prime(1) * 1) mod prime(1+1) =  2 * 1 mod  3 = 2,
a(2) = (prime(2) * 2) mod prime(2+1) =  3 * 2 mod  5 = 1,
a(3) = (prime(3) * 3) mod prime(3+1) =  5 * 3 mod  7 = 1,
a(4) = (prime(4) * 4) mod prime(4+1) =  7 * 4 mod 11 = 6,
a(5) = (prime(5) * 5) mod prime(5+1) = 11 * 5 mod 13 = 3.
		

Crossrefs

Programs

  • Mathematica
    Table[Mod[n*Prime[n],Prime[n+1]],{n,62}] (* Stefano Spezia, Jan 17 2021 *)
  • PARI
    a(n) = (prime(n)*n) % prime(n+1); \\ Michel Marcus, Jan 20 2021
  • Ruby
    require 'prime'
    values = []
    primes = Prime.first(20)
    primes.each_index do |n|
        next if n < 1
        values << (primes[n-1] * n) % primes[n]
    end
    p values
    

A356492 a(n) is the determinant of a symmetric Toeplitz matrix M(n) whose first row consists of prime(n), prime(n-1), ..., prime(1).

Original entry on oeis.org

1, 2, 5, 51, 264, 19532, -11904, 1261296, -2052864, 70621632, 24618221568, 3996020736, 743171562496, 24567175118848, -1257930752000, 864893030400, 12289833785344000, 1099483729459478528, 100515455071223808, 757166323365314560, 6294658173770137600, 7801939905505132544
Offset: 0

Views

Author

Stefano Spezia, Aug 09 2022

Keywords

Comments

Conjecture: a(n) is prime only for n = 1 and 2.
Conjecture is true because a(n) is even for n >= 4. This is because all but two rows of the matrix consist of odd numbers. - Robert Israel, Oct 13 2023

Examples

			For n = 1 the matrix M(1) is
    2
with determinant a(1) = 2.
For n = 2 the matrix M(2) is
    3, 2
    2, 3
with determinant a(2) = 5.
For n = 3 the matrix M(3) is
    5, 3, 2
    3, 5, 3
    2, 3, 5
with determinant a(3) = 51.
		

Crossrefs

Cf. A033286 (trace of the matrix M(n)), A356484 (hafnian of the matrix M(2*n)), A356493 (permanent of the matrix M(n)).

Programs

  • Maple
    f:=proc(n) uses LinearAlgebra; local i;
     Determinant(ToeplitzMatrix([seq(ithprime(i),i=n..1,-1)],symmetric));
    end proc:
    q(0):= 1:
    map(q, [$0..25]); # Robert Israel, Oct 13 2023
  • Mathematica
    k[i_]:=Prime[i]; M[ n_]:=ToeplitzMatrix[Reverse[Array[k, n]]]; a[n_]:=Det[M[n]]; Join[{1},Table[a[n],{n,21}]]
  • PARI
    a(n) = matdet(apply(prime, matrix(n,n,i,j,n-abs(i-j)))); \\ Michel Marcus, Aug 12 2022

Formula

A350955(n) <= a(n) <= A350956(n).

A008507 Number of odd composite numbers less than n-th odd prime.

Original entry on oeis.org

0, 0, 0, 1, 1, 2, 2, 3, 5, 5, 7, 8, 8, 9, 11, 13, 13, 15, 16, 16, 18, 19, 21, 24, 25, 25, 26, 26, 27, 33, 34, 36, 36, 40, 40, 42, 44, 45, 47, 49, 49, 53, 53, 54, 54, 59, 64, 65, 65, 66, 68, 68, 72, 74, 76, 78, 78, 80, 81, 81, 85, 91, 92, 92, 93, 99, 101, 105, 105, 106, 108, 111, 113, 115, 116, 118
Offset: 1

Views

Author

Gary Findley (chfindley(AT)alpha.nlu.edu)

Keywords

Comments

a(n) = A067076(n) - n + 1. - Vincenzo Librandi, Feb 02 2013
For n>=4, a(n) = k+1, where A000217(j) is the smallest triangular number such that A000217(j) - A033286(n+1) also is a triangular number, i.e., A000217(k). Example n=29, a(29) = 27: A033286(30) = 3390, A000217(86) = 3741. 3741-3390 = 351 = A000217(26); k=26, 26+1 = 27. - Bob Selcoe, Apr 12 2016

Crossrefs

Cf. A067076.
Cf. A000040 (prime numbers), A000217 (triangular numbers), A033286 (n*prime(n)).
Partial sums of A100820.

Formula

[(Odd Primes - 1)/2] - n for n > 0, or A005097(n) - A000027(n). For example, A005097(1) - A000027(1) = 1 - 1 = 0, A005097(2) - A000027(2) = 2 - 2 = 0, A005097(9) - A000027(9) = 14 - 9 = 5. - William A. Tedeschi, Apr 25 2008

Extensions

More terms from David W. Wilson, Jan 13 2000

A071228 a(n) = n*(n-th composite number).

Original entry on oeis.org

4, 12, 24, 36, 50, 72, 98, 120, 144, 180, 220, 252, 286, 336, 375, 416, 459, 504, 570, 640, 693, 748, 805, 864, 950, 1014, 1080, 1176, 1276, 1350, 1426, 1536, 1617, 1700, 1785, 1872, 1998, 2090, 2184, 2280, 2378, 2520, 2666, 2772, 2880, 2990, 3102
Offset: 1

Views

Author

Amarnath Murthy, May 17 2002

Keywords

Comments

Complement of A171521. - Jaroslav Krizek, Dec 13 2009

Examples

			a(1)= 1*4, a(2)= 2*6, a(3)= 3*9, a(4) = 4*10.
		

Crossrefs

Partial sums of A092930.

Programs

  • Maple
    count := 1: for i from 2 to 100 do if isprime(i) then else printf(`%d,`,i*count); count := count+1 fi: od: # James Sellers, May 28 2002
  • Mathematica
    Module[{cn=Select[Range[70],CompositeQ]},Times@@@Thread[{cn, Range[ Length[ cn]]}]] (* Harvey P. Dale, Nov 13 2014 *)
  • PARI
    lista(nn) = {my(nc = 0); forcomposite(c=1, nn, nc ++; print1(c*nc, ", "););} \\ Michel Marcus, Aug 31 2019

Formula

a(n) = n * A002808(n). - Jaroslav Krizek, Dec 13 2009

Extensions

More terms from James Sellers, May 28 2002
Edited by N. J. A. Sloane, Jul 02 2008 at the suggestion of R. J. Mathar

A189892 a(n) = n*prime(n) - sum_{i=1..n-1} prime(i).

Original entry on oeis.org

2, 4, 10, 18, 38, 50, 78, 94, 130, 190, 212, 284, 336, 364, 424, 520, 622, 658, 772, 852, 894, 1026, 1118, 1262, 1462, 1566, 1620, 1732, 1790, 1910, 2344, 2472, 2670, 2738, 3088, 3160, 3382, 3610, 3766, 4006, 4252, 4336, 4766, 4854, 5034, 5126, 5690
Offset: 1

Views

Author

Bruno Berselli, Apr 30 2011

Keywords

Examples

			a(4) = 4*prime(4) - (prime(3) + prime(2) + prime(1)) = 4*7 - (5 + 3 + 2) = 18.
		

Crossrefs

Programs

  • Magma
    [2] cat [n*NthPrime(n)-(&+[NthPrime(k): k in [1..n-1]]): n in [2..47]];
    
  • Mathematica
    nn=50;Join[{2},With[{prs=Accumulate[Prime[Range[nn]]]},Table[n*Prime[n]-prs[[n-1]],{n,2,nn}]]] (* Harvey P. Dale, Nov 21 2014 *)
  • PARI
    v=vector(10000);s=n=i=0;forprime(p=2,1e9,v[i++]=n++*p-s;if(i==#v,return,s+=p)) \\ Charles R Greathouse IV, May 01 2011

Formula

a(n) = A033286(n+1) - A007504(n) for n>1.

A268465 Primes of the form m*prime(m) + (m + 1)*prime(m + 1) + (m + 2)*prime(m + 2).

Original entry on oeis.org

23, 349, 1579, 4691, 5783, 7187, 9547, 11519, 15377, 45779, 52289, 353359, 361787, 384277, 510227, 678413, 710599, 1007861, 1218709, 1301617, 1484449, 1567567, 1839469, 2073989, 2264959, 2409163, 2438377, 2520779, 2735281, 2882653, 2998867, 3100271, 3211751
Offset: 1

Views

Author

Zak Seidov, Feb 05 2016

Keywords

Comments

Primes arising in A105455.
Primes of the form A033286(m)+A033286(m+1)+A033286(m+2).

Crossrefs

Cf. A033286.

Programs

  • Python
    from itertools import islice
    from sympy import isprime, nextprime
    def agen(): # generator of terms
        m, p, q, r = 1, 2, 3, 5
        while True:
            t = m*p + (m+1)*q + (m+2)*r
            if isprime(t): yield t
            m, p, q, r = m+1, q, r, nextprime(r)
    print(list(islice(agen(), 33))) # Michael S. Branicky, May 17 2022

Extensions

Typo in a(28) fixed by Seth A. Troisi, May 17 2022
a(29) and beyond from Michael S. Branicky, May 17 2022

A352028 a(n) = Product p_{n*i}^e_i if the prime factorization of n is Product p_i^e_i.

Original entry on oeis.org

1, 3, 13, 49, 47, 481, 107, 6859, 3721, 3277, 257, 121841, 397, 11309, 22261, 7890481, 653, 1390861, 881, 1416521, 78373, 47479, 1279, 157208087, 143641, 92011, 15813251, 7018237, 1889, 14701639, 2293, 38579489651, 309709, 207527, 461939, 2938615681, 3119
Offset: 1

Views

Author

Alois P. Heinz, Mar 01 2022

Keywords

Comments

Or replace prime(i) in n by prime(n*i).
All terms are odd.

Examples

			a(1) = 1 because 1 is the empty product.
a(2) = 3 = prime(2) = prime(2*1) because 2 = prime(1).
a(3) = 13 = prime(6) = prime(3*2) because 3 = prime(2).
a(4) = 49 = 7^2 = prime(4)^2 = prime(4*1)^2 because 4 = prime(1)^2.
		

Crossrefs

Main diagonal of A352001.

Programs

  • Maple
    a:= n-> mul(ithprime(n*numtheory[pi](i[1]))^i[2], i=ifactors(n)[2]):
    seq(a(n), n=1..45);
  • PARI
    a(n) = my(f=factor(n)); for (k=1, #f~, f[k,1] = prime(n*primepi(f[k,1]))); factorback(f); \\ Michel Marcus, Mar 02 2022

Formula

a(n) = A352001(n,n).
a(prime(n)) = A228529(n) = A000040(A033286(n)).

A356493 a(n) is the permanent of a symmetric Toeplitz matrix M(n) whose first row consists of prime(n), prime(n-1), ..., prime(1).

Original entry on oeis.org

1, 2, 13, 271, 12030, 1346758, 214022024, 51763672608, 16088934953136, 6611717516842608, 4412314619046451200, 3533754988232088933120, 3506189715435673999194112, 4444138735439968822425464576, 5893766827264238066914528545792, 8502284313901016361834901076874240, 15350799440394462109333953415858960384
Offset: 0

Views

Author

Stefano Spezia, Aug 09 2022

Keywords

Comments

Conjecture: a(n) is prime only for n = 1, 2, and 3.
Conjecture is true because a(n) is even for n >= 4. This is because a(n) == A356492(n) (mod 2), and all but two rows of the matrix consist of odd numbers. - Robert Israel, Oct 13 2023

Examples

			For n = 1 the matrix M(1) is
    2
with permanent a(1) = 2.
For n = 2 the matrix M(2) is
    3, 2
    2, 3
with permanent a(2) = 13.
For n = 3 the matrix M(3) is
    5, 3, 2
    3, 5, 3
    2, 3, 5
with permanent a(3) = 271.
		

Crossrefs

Cf. A033286 (trace of the matrix M(n)), A356484 (hafnian of the matrix M(2*n)), A356492 (determinant of the matrix M(n)).

Programs

  • Mathematica
    k[i_]:=Prime[i]; M[ n_]:=ToeplitzMatrix[Reverse[Array[k, n]]]; a[n_]:=Permanent[M[n]]; PrimeQ[Join[{1},Table[a[n],{n,16}]]]
  • PARI
    a(n) = matpermanent(apply(prime, matrix(n,n,i,j,n-abs(i-j)))); \\ Michel Marcus, Aug 12 2022

Formula

A351021(n) <= a(n) <= A351022(n).
Previous Showing 21-30 of 49 results. Next