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

A339115 Greatest semiprime whose prime indices sum to n.

Original entry on oeis.org

4, 6, 10, 15, 25, 35, 55, 77, 121, 143, 187, 221, 289, 323, 391, 493, 551, 667, 841, 899, 1073, 1189, 1369, 1517, 1681, 1763, 1961, 2183, 2419, 2537, 2809, 3127, 3481, 3599, 3953, 4189, 4489, 4757, 5041, 5293, 5723, 5963, 6499, 6887, 7171, 7663, 8051, 8633
Offset: 2

Views

Author

Gus Wiseman, Nov 28 2020

Keywords

Comments

A semiprime is a product of any two prime numbers. A prime index of n is a number m such that the m-th prime number divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The sequence of terms together with their prime indices begins:
        4: {1,1}      493: {7,10}      2809: {16,16}
        6: {1,2}      551: {8,10}      3127: {16,17}
       10: {1,3}      667: {9,10}      3481: {17,17}
       15: {2,3}      841: {10,10}     3599: {17,18}
       25: {3,3}      899: {10,11}     3953: {17,19}
       35: {3,4}     1073: {10,12}     4189: {17,20}
       55: {3,5}     1189: {10,13}     4489: {19,19}
       77: {4,5}     1369: {12,12}     4757: {19,20}
      121: {5,5}     1517: {12,13}     5041: {20,20}
      143: {5,6}     1681: {13,13}     5293: {19,22}
      187: {5,7}     1763: {13,14}     5723: {17,25}
      221: {6,7}     1961: {12,16}     5963: {19,24}
      289: {7,7}     2183: {12,17}     6499: {19,25}
      323: {7,8}     2419: {13,17}     6887: {20,25}
      391: {7,9}     2537: {14,17}     7171: {20,26}
		

Crossrefs

A024697 is the sum of the same semiprimes.
A332765/A332877 is the squarefree case.
A338904 has this sequence as row maxima.
A339114 is the least among the same semiprimes.
A001358 lists semiprimes, with odd/even terms A046315/A100484.
A006881 lists squarefree semiprimes, with odd/even terms A046388/A100484.
A037143 lists primes and semiprimes.
A084126 and A084127 give the prime factors of semiprimes.
A087112 groups semiprimes by greater factor.
A320655 counts factorizations into semiprimes.
A338898, A338912, and A338913 give the prime indices of semiprimes, with product A087794, sum A176504, and difference A176506.
A338899, A270650, and A270652 give the prime indices of squarefree semiprimes, with difference A338900.
A338907/A338906 list semiprimes of odd/even weight.
A338907/A338908 list squarefree semiprimes of odd/even weight.

Programs

  • Maple
    P:= [seq(ithprime(i),i=1..200)]:
    [seq(max(seq(P[i]*P[j-i],i=1..j-1)),j=2..200)]; # Robert Israel, Dec 06 2020
  • Mathematica
    Table[Max@@Table[Prime[k]*Prime[n-k],{k,n-1}],{n,2,30}]

A339195 Triangle of squarefree numbers grouped by greatest prime factor, read by rows.

Original entry on oeis.org

1, 2, 3, 6, 5, 10, 15, 30, 7, 14, 21, 35, 42, 70, 105, 210, 11, 22, 33, 55, 66, 77, 110, 154, 165, 231, 330, 385, 462, 770, 1155, 2310, 13, 26, 39, 65, 78, 91, 130, 143, 182, 195, 273, 286, 390, 429, 455, 546, 715, 858, 910, 1001, 1365, 1430, 2002, 2145, 2730, 3003, 4290, 5005, 6006, 10010, 15015, 30030
Offset: 0

Views

Author

Gus Wiseman, Dec 02 2020

Keywords

Comments

Also Heinz numbers of subsets of {1..n} that contain n if n>0, where the Heinz number of an integer partition (y_1,...,y_k) is prime(y_1)*...*prime(y_k).
A019565 in its triangle form, with each row's terms in increasing order. - Peter Munn, Feb 26 2021
From David James Sycamore, Jan 09 2025: (Start)
Alternative definition, with offset = 1: a(1) = 1. For n>1 if a(n-1) = A002110(k), a(n) = prime(k+1). Otherwise a(n) is the smallest novel squarefree number whose prime factors have already occurred as previous terms.
Permutation of A005117, Squarefree version A379746. (End)

Examples

			Triangle begins:
   1
   2
   3   6
   5  10  15  30
   7  14  21  35  42  70  105  210
		

Crossrefs

A011782 gives row lengths.
A339360 gives row sums.
A008578 (shifted) is column k = 1.
A100484 is column k = 2.
A001748 is column k = 3.
A002110 is column k = 2^(n-1).
A070826 is column k = 2^(n-1) - 1.
A209862 takes prime indices to binary indices in these terms.
A246867 groups squarefree numbers by Heinz weight, with row sums A147655.
A261144 divides the n-th row by prime(n), with row sums A054640.
A339116 is the restriction to semiprimes, with row sums A339194.
A005117 lists squarefree numbers, ordered lexicographically by prime factors: A019565.
A006881 lists squarefree semiprimes.
A072047 counts prime factors of squarefree numbers.
A319246 is the sum of prime indices of the n-th squarefree number.
A329631 lists prime indices of squarefree numbers, reversed: A319247.
A338899/A270650/A270652 give the prime indices of squarefree semiprimes.
Cf. A379746.

Programs

  • Maple
    T:= proc(n) option remember; `if`(n=0, 1, (p-> map(
          x-> x*p, {seq(T(i), i=0..n-1)})[])(ithprime(n)))
        end:
    seq(T(n), n=0..6);  # Alois P. Heinz, Jan 08 2025
  • Mathematica
    Table[Prime[n]*Sort[Times@@Prime/@#&/@Subsets[Range[n-1]]],{n,5}]

Formula

For n > 1, T(n,k) = prime(n) * A261144(n-1,k).
a(n) = A019565(A379770(n)). - Michael De Vlieger, Jan 08 2025

Extensions

Row n=0 (term 1) prepended by Alois P. Heinz, Jan 08 2025

A340991 Triangle T(n,k) whose k-th column is the k-fold self-convolution of the primes; triangle T(n,k), n>=0, 0<=k<=n, read by rows.

Original entry on oeis.org

1, 0, 2, 0, 3, 4, 0, 5, 12, 8, 0, 7, 29, 36, 16, 0, 11, 58, 114, 96, 32, 0, 13, 111, 291, 376, 240, 64, 0, 17, 188, 669, 1160, 1120, 576, 128, 0, 19, 305, 1386, 3121, 4040, 3120, 1344, 256, 0, 23, 462, 2678, 7532, 12450, 12864, 8288, 3072, 512, 0, 29, 679, 4851, 16754, 34123, 44652, 38416, 21248, 6912, 1024
Offset: 0

Views

Author

Alois P. Heinz, Feb 01 2021

Keywords

Examples

			Triangle T(n,k) begins:
  1;
  0,  2;
  0,  3,   4;
  0,  5,  12,    8;
  0,  7,  29,   36,   16;
  0, 11,  58,  114,   96,    32;
  0, 13, 111,  291,  376,   240,    64;
  0, 17, 188,  669, 1160,  1120,   576,  128;
  0, 19, 305, 1386, 3121,  4040,  3120, 1344,  256;
  0, 23, 462, 2678, 7532, 12450, 12864, 8288, 3072, 512;
  ...
		

Crossrefs

Columns k=0-4 give (offsets may differ): A000007, A000040, A014342, A014343, A014344.
Main diagonal gives A000079.
Row sums give A030017(n+1).
T(2n,n) gives A340990.

Programs

  • Maple
    T:= proc(n, k) option remember; `if`(k=0, `if`(n=0, 1, 0),
          `if`(k=1, `if`(n=0, 0, ithprime(n)), (q->
           add(T(j, q)*T(n-j, k-q), j=0..n))(iquo(k, 2))))
        end:
    seq(seq(T(n, k), k=0..n), n=0..12);
    # Uses function PMatrix from A357368.
    PMatrix(10, ithprime); # Peter Luschny, Oct 09 2022
  • Mathematica
    T[n_, k_] := T[n, k] = If[k == 0, If[n == 0, 1, 0],
         If[k == 1, If[n == 0, 0, Prime[n]], With[{q = Quotient[k, 2]},
         Sum[T[j, q] T[n - j, k - q], {j, 0, n}]]]];
    Table[Table[T[n, k], {k, 0, n}], {n, 0, 12}] // Flatten (* Jean-François Alcover, Feb 10 2021, after Alois P. Heinz *)

Formula

T(n,k) = [x^n] (Sum_{j>=1} prime(j)*x^j)^k.
Sum_{k=0..n} k * T(n,k) = A030281(n).
Sum_{k=0..n} (-1)^k * T(n,k) = A030018(n).
Conjecture: row polynomials are x*R(n,1) for n > 0 where R(n,k) = R(n-1,k+1) + x*R(n-1,1)*R(1,k) for n > 1, k > 0 with R(1,k) = prime(k) for k > 0. The same recursion seems to work for self-convolution of any other sequence. - Mikhail Kurkov, Apr 05 2025

A299111 Maximum value of the cyclic convolution of first n primes with themselves.

Original entry on oeis.org

4, 13, 37, 82, 183, 344, 601, 918, 1355, 2048, 2873, 3978, 5455, 7112, 9105, 11530, 14391, 17504, 21353, 25686, 30311, 35536, 41421, 48010, 55911, 64632, 73869, 83766, 94151, 105420, 118569, 132566, 148247, 164564, 182617, 201770, 222975, 245532, 269253
Offset: 1

Views

Author

Andres Cicuttin, Feb 02 2018

Keywords

Examples

			For n = 4 the four possible cyclic convolution of first four primes with themselves are:
(2,3,5,7).(7,5,3,2) = 2*7 + 3*5 + 5*3 + 7*2 = 14 + 15 + 15 + 14 = 58,
(2,3,5,7).(2,7,5,3) = 2*2 + 3*7 + 5*5 + 7*3 = 4 + 21 + 25 + 21 = 71,
(2,3,5,7).(3,2,7,5) = 2*3 + 3*2 + 5*7 + 7*5 = 6 + 6 + 35 + 35 = 82,
(2,3,5,7).(5,3,2,7) = 2*5 + 3*3 + 5*2 + 7*7 = 10 + 9 + 10 + 49 = 78,
then a(4)=82 because 82 is the maximum among the four values.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local V,R,i;
        V:= Vector(n, ithprime);
        R:= ArrayTools:-FlipDimension(V,1)^%T;
        max(seq(ArrayTools:-CircularShift(R,i) . V, i=0..n-1))
    end proc:
    map(f, [$1..100]); # Robert Israel, Feb 07 2018
  • Mathematica
    a[n_]:=Prime[Range[n]];
    Table[Max@Table[a[n].RotateRight[Reverse[a[n]], j], {j, 0, n - 1}], {n,1,36}]
  • PARI
    a(n) = my(vp=primes(n)); vecmax(vector(n, k, sum(i=1, n, vp[n-i+1]*vp[1+(i+k)%n]))); \\ Michel Marcus, Feb 07 2018; Jun 15 2022

Formula

a(n) = Max_{k=1..n} Sum_{i=1..n} prime(n-i+1)*prime(1+(i+k) mod n).
a(n) >= A014342(n). Does the ratio a(n)/A014342(n) have a limit as n -> infinity? - Robert Israel, Feb 07 2018

A339194 Sum of all squarefree semiprimes with greater prime factor prime(n).

Original entry on oeis.org

0, 6, 25, 70, 187, 364, 697, 1102, 1771, 2900, 3999, 5920, 8077, 10234, 13207, 17384, 22479, 26840, 33567, 40328, 46647, 56248, 65653, 77786, 93411, 107060, 119583, 135248, 149439, 167240, 202311, 225320, 253587, 276332, 316923, 343676, 381039, 421192, 458749
Offset: 1

Views

Author

Gus Wiseman, Dec 02 2020

Keywords

Examples

			The triangle A339116 with row sums equal to this sequence begins (n > 1):
    6 = 6
   25 = 10 + 15
   70 = 14 + 21 + 35
  187 = 22 + 33 + 55 + 77
		

Crossrefs

A025129 gives sums of squarefree semiprimes by weight, row sums of A338905.
A143215 is the not necessarily squarefree version, row sums of A087112.
A339116 is a triangle of squarefree semiprimes with these row sums.
A339360 looks at all squarefree numbers, row sums of A339195.
A001358 lists semiprimes.
A005117 lists squarefree numbers.
A006881 lists squarefree semiprimes, with odd terms A046388.
A024697 is the sum of semiprimes of weight n.
A168472 gives partial sums of squarefree semiprimes.
A332765 gives the greatest squarefree semiprime of weight n.
A338898/A338912/A338913 give the prime indices of semiprimes, with product A087794, sum A176504, and difference A176506.
A338899/A270650/A270652 give the prime indices of squarefree semiprimes, with difference A338900.
A338904 groups semiprimes by weight.
A338907/A338908 list squarefree semiprimes of odd/even weight.

Programs

  • Mathematica
    Table[Sum[Prime[i]*Prime[j],{j,i-1}],{i,10}]
  • PARI
    a(n) = prime(n)*vecsum(primes(n-1)); \\ Michel Marcus, Jun 15 2024

Formula

a(n) = prime(n) * Sum_{k=1..n-1} prime(k) = prime(n) * A007504(n-1).
a(n) = A024447(n) - A024447(n-1).
a(n) = A034960(n) - A143215(n). - Marco Zárate, Jun 14 2024

A023626 Self-convolution of (1, p(1), p(2), ...).

Original entry on oeis.org

1, 4, 10, 22, 43, 80, 137, 222, 343, 508, 737, 1030, 1411, 1888, 2477, 3198, 4059, 5096, 6297, 7702, 9327, 11176, 13301, 15682, 18355, 21344, 24673, 28358, 32411, 36896, 41769, 47082, 52883, 59148, 65937, 73298, 81251, 89776, 98957
Offset: 1

Views

Author

Keywords

Comments

p(1),p(2),p(3)... are the prime numbers (A000040). The analogous sequence for the partition numbers is A048574.

Examples

			G.f. = x + 4*x^2 + 10*x^3 + 22*x^4 + 43*x^5 + 80*x^6 + 137*x^7 + ...
		

Crossrefs

Programs

  • Haskell
    a023626 n = a023626_list !! (n-2)
    a023626_list = f a000040_list [1] where
       f (p:ps) rs = (sum $ zipWith (*) rs a008578_list) : f ps (p : rs)
    -- Reinhard Zumkeller, Nov 09 2015
  • Mathematica
    z = 100; p = Join[{1}, Prime[Range[z]]];
    a[n_] := Sum[p[[i]] p[[n - i + 1]], {i, 1, n}];
    Table[a[n], {n, 1, z}]  (* Clark Kimberling, Dec 01 2016 *)
    a[ n_] := If[ n < 1, 0, SeriesCoefficient[ (1 + O[x]^n + Sum[ Prime[k] x^k, {k, n - 1}])^2, {x, 0, n - 1}]]; (* Michael Somos, Dec 01 2016 *)
    Table[With[{c=Join[{1},Prime[Range[n]]]},ListConvolve[c,c]],{n,0,40}]// Flatten (* Harvey P. Dale, Oct 19 2018 *)

Formula

G.f: x*(1+b(x))^2 = (c(x)^2)/x, where b(x) and c(x) are respectively the g.f. of A000040 and A008578. - Mario C. Enriquez, Dec 10 2016

A143215 a(n) = prime(n) * Sum_{i=1..n} prime(i).

Original entry on oeis.org

4, 15, 50, 119, 308, 533, 986, 1463, 2300, 3741, 4960, 7289, 9758, 12083, 15416, 20193, 25960, 30561, 38056, 45369, 51976, 62489, 72542, 85707, 102820, 117261, 130192, 146697, 161320, 180009, 218440, 242481, 272356, 295653, 339124, 366477
Offset: 1

Views

Author

Gary W. Adamson, Jul 30 2008

Keywords

Comments

Row sums of triangle A087112.
Sum of semiprimes (A001358) with greater prime factor prime(n). - Gus Wiseman, Dec 06 2020

Examples

			The series begins (4, 15, 50, 119, 308,...) since the primes = (2, 3, 5, 7, 11,...) and partial sum of primes = (2, 5, 10, 17, 28,...).
a(5) = 308 = 11 * 28.
a(4) = 119 = sum of row 4 terms of triangle A087112: (14 + 21 + 35 + 49).
		

Crossrefs

Row sums of A087112.
The squarefree version is A339194, row sums of A339116.
Semiprimes grouped by weight are A338904, with row sums A024697.
Squarefree semiprimes grouped by weight are A338905, with row sums A025129.
Squarefree numbers grouped by greatest prime factor are A339195, with row sums A339360.
A001358 lists semiprimes.
A006881 lists squarefree semiprimes.
A332765 is the greatest semiprime of weight n.
A338898/A338912/A338913 give the prime indices of semiprimes.
A338899/A270650/A270652 give the prime indices of squarefree semiprimes.

Programs

Formula

a(n) = A000040(n) * A007504(n).

Extensions

More terms from Vladimir Joseph Stephan Orlovsky, Sep 21 2009

A209403 Convolution of primes with odd primes.

Original entry on oeis.org

6, 19, 44, 89, 162, 271, 424, 633, 910, 1275, 1732, 2309, 3018, 3859, 4872, 6057, 7446, 9051, 10888, 12997, 15358, 18011, 20972, 24277, 27950, 31991, 36464, 41325, 46602, 52367, 58612, 65385, 72722, 80651, 89160, 98317, 108070, 118535, 129756, 141713, 154442
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 08 2012

Keywords

Examples

			a(2) = 2*5 + 3*3 = 19.
		

Crossrefs

Programs

  • Haskell
    a209403 n = sum $
       zipWith (*) (reverse $ take n a000040_list) a065091_list
    
  • Magma
    [&+[NthPrime(k)*NthPrime(n+1-k): k in [1..n-1]]: n in [2..40]]; // Bruno Berselli, Mar 08 2012
    
  • Mathematica
    Rest[Flatten[Table[ListConvolve[Prime[Range[2,n]],Prime[Range[n-1]]],{n,50}]]] (* Harvey P. Dale, Jan 10 2022 *)
  • Python
    from numpy import convolve
    from sympy import prime, primerange
    def aupton(nn):
        primes = list(primerange(2, prime(nn+1)+1))
        return list(convolve(primes[:-1], primes[1:]))[:nn]
    print(aupton(41)) # Michael S. Branicky, Jun 19 2021

Formula

a(n) = Sum_{k=1..n} A000040(k) * A065091(n-k+1).

A014343 Three-fold convolution of primes with themselves.

Original entry on oeis.org

8, 36, 114, 291, 669, 1386, 2678, 4851, 8373, 13858, 22134, 34263, 51635, 75972, 109374, 154483, 214383, 292812, 394148, 523521, 686901, 891112, 1143936, 1454187, 1831973, 2288400, 2836044, 3488969, 4262541, 5173836, 6241612, 7486437, 8930649, 10598848
Offset: 0

Views

Author

Keywords

Crossrefs

Column k=3 of A340991.

Programs

  • Mathematica
    Table[Sum[Prime[k + 1] Sum[Prime[i] Prime[# + 1 - i], {i, #}] &[n - k + 1], {k, 0, n}], {n, 0, 26}] (* Michael De Vlieger, Dec 13 2016 *)

Formula

From Mario C. Enriquez, Dec 13 2016: (Start)
G.f: (b(x)^3)/(x^2), where b(x) is the g.f. of A000040.
a(n) = Sum_{k=0..n} A014342(n-k+1)*A000040(k+1).
(End)

A014344 Four-fold convolution of primes with themselves.

Original entry on oeis.org

16, 96, 376, 1160, 3121, 7532, 16754, 34796, 68339, 127952, 229956, 398688, 669781, 1094076, 1742710, 2713604, 4139111, 6195712, 9115304, 13199072, 18833449, 26509260, 36843322, 50603884, 68740107, 92414192, 123039628, 162323200, 212312453, 275448380
Offset: 0

Views

Author

Keywords

Crossrefs

Column k=4 of A340991.

Programs

  • Maple
    b:= proc(n, k) option remember; `if`(k=1, ithprime(n+1),
          add(b(j, floor(k/2))*b(n-j, ceil(k/2)), j=0..n))
        end:
    a:= n-> b(n, 4):
    seq(a(n), n=0..35);  # Alois P. Heinz, Mar 10 2018
  • Mathematica
    b[n_, k_] := b[n, k] = If[k==1, Prime[n+1], Sum[b[j, Floor[k/2]] b[n-j, Ceiling[k/2]], {j, 0, n}]];
    a[n_] := b[n, 4];
    a /@ Range[0, 35] (* Jean-François Alcover, Nov 16 2020, after Alois P. Heinz *)
  • PARI
    my(N = 50, x = 'x + O('x^N)); Vec(((1/x)*sum(k=1, N, prime(k)*x^k))^4) \\ Michel Marcus, Mar 10 2018

Formula

G.f.: ((1/x)*Sum_{k>=1} prime(k)*x^k)^4. - Ilya Gutkovskiy, Mar 10 2018
Previous Showing 11-20 of 29 results. Next