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-4 of 4 results.

A087112 Triangle in which the n-th row contains n distinct semiprimes not listed previously with all prime factors from among the first n primes.

Original entry on oeis.org

4, 6, 9, 10, 15, 25, 14, 21, 35, 49, 22, 33, 55, 77, 121, 26, 39, 65, 91, 143, 169, 34, 51, 85, 119, 187, 221, 289, 38, 57, 95, 133, 209, 247, 323, 361, 46, 69, 115, 161, 253, 299, 391, 437, 529, 58, 87, 145, 203, 319, 377, 493, 551, 667, 841, 62, 93, 155, 217, 341, 403, 527, 589, 713, 899, 961
Offset: 1

Views

Author

Ray Chandler, Aug 21 2003

Keywords

Comments

Terms through row n, sorted, will provide terms for A077553 through row n*(n+1)/2.

Examples

			Triangle begins:
   4;
   6,   9;
  10,  15,  25;
  14,  21,  35,  49;
  22,  33,  55,  77, 121;
  26,  39,  65,  91, 143, 169;
		

Crossrefs

Cf. A100484 (left edge), A001248 (right edge), A143215 (row sums), A219603 (central terms of odd-indexed rows); A000040, A065342.

Programs

  • Haskell
    a087112 n k = a087112_tabl !! (n-1) !! (k-1)
    a087112_row n = map (* last ps) ps where ps = take n a000040_list
    a087112_tabl = map a087112_row [1..]
    -- Reinhard Zumkeller, Nov 25 2012
    
  • Maple
    T := (n, k) -> ithprime(n) * ithprime(k):
    seq(print(seq(T(n, k), k = 1..n)), n = 1..11);  # Peter Luschny, Jun 25 2024
  • Mathematica
    Table[ Prime[j]*Prime[k], {j, 11}, {k, j}] // Flatten (* Robert G. Wilson v, Feb 06 2017 *)
  • PARI
    A087112(n) = { n--; my(c = (sqrtint(8*n + 1) - 1) \ 2); (prime(1+c) * prime(1+(n-binomial(1+c, 2)))); }; \\ Antti Karttunen, Feb 29 2024

Formula

The n-th row consists of n terms, prime(n)*prime(i), i=1..n.
T(n, k) = A000040(n) * A000040(k).
For n >= 2, a(n) = A276086(A370121(n-1)). - Antti Karttunen, Feb 29 2024

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

A357251 a(n) = Sum_{1<=i<=j<=n} prime(i)*prime(j).

Original entry on oeis.org

4, 19, 69, 188, 496, 1029, 2015, 3478, 5778, 9519, 14479, 21768, 31526, 43609, 59025, 79218, 105178, 135739, 173795, 219164, 271140, 333629, 406171, 491878, 594698, 711959, 842151, 988848, 1150168, 1330177, 1548617, 1791098, 2063454, 2359107, 2698231, 3064708, 3470396, 3918157, 4404795, 4938846
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Sep 20 2022

Keywords

Comments

a(n) is the sum of products of unordered pairs of (not necessarily distinct) elements from the first n primes.
It appears that 4 is the only square in the sequence.

Examples

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

Crossrefs

Partial sums of A143215.
Row n=2 of A343751.

Programs

  • Maple
    P:= [seq(ithprime(i),i=1..100)]:
    S:= ListTools:-PartialSums(P):
    ListTools:-PartialSums(zip(`*`,P,S));
  • Mathematica
    Accumulate[(p = Prime[Range[40]]) * Accumulate[p]] (* Amiram Eldar, Sep 20 2022 *)
  • Python
    from itertools import accumulate
    from sympy import prime, primerange
    def aupton(nn):
        p = list(primerange(2, prime(nn)+1))
        return list(accumulate(c*d for c, d in zip(p, accumulate(p))))
    print(aupton(40)) # Michael S. Branicky, Sep 24 2022 after Amiram Eldar

Formula

a(n) = (A007504(n)^2 + A024450(n))/2.
a(n) = A024447(n) + A024450(n).
a(n) = A065762(n)/2. - Hugo Pfoertner, Sep 24 2022

A143228 Triangle read by rows, T(n,k) = p(n) * p(k), where p(n) = the number of partitions of n, for 0 <= k <= n.

Original entry on oeis.org

1, 1, 1, 2, 2, 4, 3, 3, 6, 9, 5, 5, 10, 15, 25, 7, 7, 14, 21, 35, 49, 11, 11, 22, 33, 55, 77, 121, 15, 15, 30, 45, 75, 105, 165, 225, 22, 22, 44, 66, 110, 154, 242, 330, 484, 30, 30, 60, 90, 150, 210, 330, 450, 660, 900, 42, 42, 84, 126, 210, 294, 462, 630, 924, 1260, 1764
Offset: 0

Views

Author

Gary W. Adamson, Jul 31 2008

Keywords

Examples

			First few rows of the triangle:
   1;
   1,  1;
   2,  2,  4;
   3,  3,  6,  9;
   5,  5, 10, 15, 25;
   7,  7, 14, 21, 35,  49;
  11, 11, 22, 33, 55,  77, 121;
  15, 15, 30, 45, 75, 105, 165, 225;
  ...
T(7,4) = 75 = p(7) * p(4) = 15 * 5.
		

Crossrefs

Cf. A000041, A143229 (row sums).
Main diagonal gives: A001255.

Programs

  • Magma
    A143228:= func< n,k | NumberOfPartitions(n)*NumberOfPartitions(k) >;
    [A143228(n,k): k in [0..n], n in [0..12]]; // G. C. Greubel, Aug 27 2024
    
  • Mathematica
    Table[PartitionsP[n]*PartitionsP[k], {n,0,12}, {k,0,n}]//Flatten (* G. C. Greubel, Aug 27 2024 *)
  • SageMath
    def A143215(n,k): return number_of_partitions(n)*number_of_partitions(k)
    flatten([[A143215(n,k) for k in range(n+1)] for n in range(13)]) # G. C. Greubel, Aug 27 2024

Formula

T(n, 0) = A000041(n) (left border).
Sum_{k=0..n} T(n, k) = A143229(n) (row sums).
Sum_{k=0..n} (-1)^k*T(n, k) = (-1)^n*A000041(n)*A087787(n). - G. C. Greubel, Aug 27 2024
Showing 1-4 of 4 results.