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

A357252 Primes in A357251.

Original entry on oeis.org

19, 14479, 43609, 406171, 711959, 1330177, 2698231, 3918157, 18987169, 26135339, 194727347, 269998639, 975929347, 5005853669, 8430389621, 24830247671, 36372313009, 69703708967, 93194681917, 126628534313, 139478926201, 304123612349, 359101509211, 384305009171, 387550106843, 400722388999
Offset: 1

Views

Author

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

Keywords

Comments

Primes that are, for some N, the sum of p*q for all pairs of primes (p,q) with p <= q <= N.

Examples

			a(2) = 14479 is in the sequence because 14479 = A357251(11) is the sum of p*q for primes p <= q <= 31 and is prime.
		

Crossrefs

Cf. A357251.

Programs

  • Maple
    p:= 2: a:= 4: s:= 2: R:= NULL: count:= 0:
    for i from 1 while count < 100 do
      p:= nextprime(p);
      s:= s + p;
      a:= a + p*s;
      if isprime(a) then count:= count+1; R:= R,a; fi
    od:
    R;

A343751 A(n,k) is the sum of all compositions [c_1, c_2, ..., c_k] of n into k nonnegative parts encoded as Product_{i=1..k} prime(i)^(c_i); square array A(n,k), n>=0, k>=0, read by antidiagonals.

Original entry on oeis.org

1, 1, 0, 1, 2, 0, 1, 5, 4, 0, 1, 10, 19, 8, 0, 1, 17, 69, 65, 16, 0, 1, 28, 188, 410, 211, 32, 0, 1, 41, 496, 1726, 2261, 665, 64, 0, 1, 58, 1029, 7182, 14343, 11970, 2059, 128, 0, 1, 77, 2015, 20559, 93345, 112371, 61909, 6305, 256, 0, 1, 100, 3478, 54814, 360612, 1139166, 848506, 315850, 19171, 512, 0
Offset: 0

Views

Author

Alois P. Heinz, Apr 27 2021

Keywords

Examples

			A(1,3) = 10 = 5 + 3 + 2, sum of encoded compositions [0,0,1], [0,1,0], [1,0,0].
A(4,2) = 211 = 81 + 54 + 36 + 24 + 16, sum of encoded compositions [0,4], [1,3], [2,2], [3,1], [4,0].
Square array A(n,k) begins:
  1,  1,    1,     1,      1,        1,        1, ...
  0,  2,    5,    10,     17,       28,       41, ...
  0,  4,   19,    69,    188,      496,     1029, ...
  0,  8,   65,   410,   1726,     7182,    20559, ...
  0, 16,  211,  2261,  14343,    93345,   360612, ...
  0, 32,  665, 11970, 112371,  1139166,  5827122, ...
  0, 64, 2059, 61909, 848506, 13379332, 89131918, ...
		

Crossrefs

Columns k=0-4 give: A000007, A000079, A001047(n+1), A016273, A025931.
Rows n=0-2 give: A000012, A007504, A357251.
Main diagonal gives A332967.

Programs

  • Maple
    A:= proc(n, k) option remember; `if`(n=0, 1,
         `if`(k=0, 0, add(ithprime(k)^i*A(n-i, k-1), i=0..n)))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..10);
    # second Maple program:
    A:= proc(n, k) option remember; `if`(n=0, 1,
         `if`(k=0, 0, ithprime(k)*A(n-1, k)+A(n, k-1)))
        end:
    seq(seq(A(n, d-n), n=0..d), d=0..10);
  • Mathematica
    A[n_, k_] := A[n, k] = If[n == 0, 1,
         If[k == 0, 0, Prime[k] A[n-1, k] + A[n, k-1]]];
    Table[Table[A[n, d-n], {n, 0, d}], {d, 0, 10}] // Flatten (* Jean-François Alcover, Nov 06 2021, after 2nd Maple program *)

Formula

A(n,k) = [x^n] Product_{i=1..k} 1/(1-prime(i)*x).
A(n,k) = A124960(n+k,k) for k >= 1.
Showing 1-2 of 2 results.