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

A299053 Minimum value of the cyclic autocorrelation of first n primes.

Original entry on oeis.org

4, 12, 31, 62, 133, 224, 377, 558, 865, 1304, 1805, 2462, 3337, 4280, 5389, 6726, 8449, 10264, 12663, 15294, 18061, 21200, 24961, 29166, 34173, 39508, 45017, 50870, 57141, 63788, 72299, 81234, 91365, 101732, 113327, 125166, 138355, 152348, 167179, 182862
Offset: 1

Views

Author

Andres Cicuttin, Feb 01 2018

Keywords

Comments

Maximum values of the cyclic autocorrelation of first n primes are in A024450.
If we use this definition with integers instead of primes it is obtained A088003.

Examples

			For n = 4 the four possible cyclic autocorrelations of first four primes are:
(2,3,5,7).(2,3,5,7) = 2*2 + 3*3 + 5*5 + 7*7 = 4 + 9 + 25 + 49 = 87,
(2,3,5,7).(7,2,3,5) = 2*7 + 3*2 + 5*3 + 7*5 = 14 + 6 + 15 + 35 = 70,
(2,3,5,7).(5,7,2,3) = 2*5 + 3*7 + 5*2 + 7*3 = 10 + 21 + 10 + 21 = 62,
(2,3,5,7).(3,5,7,2) = 2*3 + 3*5 + 5*7 + 7*2 = 6 + 15 + 35 + 14 = 70,
then a(4)=62 because 62 is the minimum among the four values.
		

Crossrefs

Programs

  • Maple
    a:= n-> min(seq(add(ithprime(i)*ithprime(irem(i+k, n)+1), i=1..n), k=1..n)):
    seq(a(n), n=1..40);  # Alois P. Heinz, Feb 06 2018
  • Mathematica
    p[n_]:=Prime[Range[n]];
    Table[Table[p[n].RotateRight[p[n],j],{j,0,n-1}]//Min,{n,1,36}]
  • PARI
    a(n) = vecmin(vector(n, k, sum(i=1, n, prime(i)*prime(1+(i+k)%n)))); \\ Michel Marcus, Feb 07 2018

Formula

a(n) = Min_{k=1..n} Sum_{i=1..n} prime(i)*prime(1 + (i+k) mod n).

A333370 Convolution of primorial numbers (A002110) with themselves.

Original entry on oeis.org

1, 4, 16, 84, 576, 5820, 72720, 1181460, 21984480, 493882620, 13996733520, 430612001820, 15742074348000, 641147559872820, 27488197348531920, 1286344285877911260, 67817877972050366160, 3984226025421591129180, 242703493548359285922480, 16211176424801583698573100
Offset: 0

Views

Author

Ilya Gutkovskiy, Mar 17 2020

Keywords

Crossrefs

Programs

  • Maple
    p:= proc(n) option remember; `if`(n<1, 1, ithprime(n)*p(n-1)) end:
    a:= n-> add(p(i)*p(n-i), i=0..n):
    seq(a(n), n=0..20);  # Alois P. Heinz, Mar 17 2020
  • Mathematica
    primorial[n_] := Product[Prime[k], {k, 1, n}]; a[n_] := Sum[primorial[k] primorial[n - k], {k, 0, n}]; Table[a[n], {n, 0, 19}]

Formula

G.f.: (Sum_{k>=0} prime(k)# * x^k)^2, where prime()# = A002110.
a(n) = Sum_{k=0..n} prime(k)# * prime(n-k)#.

A337327 Maximum value of the cyclic self-convolution of the first n terms of the characteristic function of primes.

Original entry on oeis.org

0, 1, 2, 2, 3, 2, 4, 3, 3, 3, 4, 4, 6, 5, 4, 4, 6, 5, 8, 7, 6, 6, 8, 7, 8, 7, 6, 6, 8, 7, 10, 9, 8, 8, 8, 8, 10, 9, 8, 8, 10, 10, 12, 12, 10, 11, 12, 12, 12, 13, 12, 12, 14, 13, 14, 13, 12, 12, 12, 12, 14, 13, 12, 13, 12, 14, 14, 15, 12, 14, 14, 16, 16, 18
Offset: 1

Views

Author

Andres Cicuttin, Aug 23 2020

Keywords

Examples

			The primes among the first 5 positive integers (1,2,3,4,5) are 2, 3, and 5, then the corresponding characteristic function of primes is (0,1,1,0,1) (see A010051) and the corresponding five possible cyclic self-convolutions are the dot products between (0,1,1,0,1) and the rotations of its mirrored version as shown below:
  (0,1,1,0,1).(1,0,1,1,0) = 0*1 + 1*0 + 1*1 + 0*1 + 1*0 = 1,
  (0,1,1,0,1).(0,1,0,1,1) = 0*0 + 1*1 + 1*0 + 0*1 + 1*1 = 2,
  (0,1,1,0,1).(1,0,1,0,1) = 0*1 + 1*0 + 1*1 + 0*0 + 1*1 = 2,
  (0,1,1,0,1).(1,1,0,1,0) = 0*1 + 1*1 + 1*0 + 0*1 + 1*0 = 1,
  (0,1,1,0,1).(0,1,1,0,1) = 0*0 + 1*1 + 1*1 + 0*0 + 1*1 = 3.
Then a(5)=3 because 3 is the maximum among the five values.
		

Crossrefs

Programs

  • Mathematica
    b[n_]:=Table[If[PrimeQ[i],1,0],{i,1,n}];
    Table[Max@Table[b[n].RotateRight[Reverse[b[n]],j],{j,0,n-1}],{n,1,100}]
  • PARI
    a(n) = vecmax(vector(n, k, sum(i=1, n, isprime(n-i+1)*isprime(1+(i+k)%n)))); \\ Michel Marcus, Aug 26 2020

A337802 Minimum value of the cyclic self-convolution of the first n terms of the characteristic function of primes.

Original entry on oeis.org

0, 0, 1, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
Offset: 1

Views

Author

Andres Cicuttin, Sep 22 2020

Keywords

Comments

In the first 1000 terms, a(n) = 1 only for n = 3, 5, 7, 11, 13, 17, 19, 23, 31, 43, 47, 61, 73, 107, 109, 113, 181, 199, and 467.
Is there an index k such that a(n) = 0 for n > k ?

Examples

			The primes among the first 5 positive integers (1,2,3,4,5) are 2, 3, and 5, then the corresponding characteristic function of primes is (0,1,1,0,1) (see A010051) and the corresponding five possible cyclic self-convolutions are the dot products between (0,1,1,0,1) and the rotations of its mirrored version as shown below:
  (0,1,1,0,1).(1,0,1,1,0) = 0*1 + 1*0 + 1*1 + 0*1 + 1*0 = 1,
  (0,1,1,0,1).(0,1,0,1,1) = 0*0 + 1*1 + 1*0 + 0*1 + 1*1 = 2,
  (0,1,1,0,1).(1,0,1,0,1) = 0*1 + 1*0 + 1*1 + 0*0 + 1*1 = 2,
  (0,1,1,0,1).(1,1,0,1,0) = 0*1 + 1*1 + 1*0 + 0*1 + 1*0 = 1,
  (0,1,1,0,1).(0,1,1,0,1) = 0*0 + 1*1 + 1*1 + 0*0 + 1*1 = 3.
Then a(5)=1 because 1 is the minimum among the five values.
		

Crossrefs

Programs

  • Mathematica
    b[n_] := Table[If[PrimeQ[i], 1, 0], {i, 1, n}];
    Table[Min@Table[b[n].RotateRight[Reverse[b[n]], j], {j, 0, n - 1}], {n, 1, 100}]
  • PARI
    a(n) = vecmin(vector(n, k, sum(i=1, n, isprime(n-i+1)*isprime(1+(i+k)%n)))); \\ Michel Marcus, Sep 23 2020

A084370 Convolution of odd primes with themselves.

Original entry on oeis.org

9, 30, 67, 136, 237, 386, 587, 852, 1213, 1658, 2227, 2932, 3765, 4766, 5939, 7324, 8917, 10746, 12851, 15200, 17845, 20794, 24083, 27748, 31785, 36250, 41107, 46376, 52113, 58350, 65111, 72444, 80353, 88858, 98003, 107744, 118201, 129410, 141355, 154080
Offset: 1

Views

Author

Jon Perry, Jun 23 2003

Keywords

Examples

			a(4) = 11*3 + 7*5 + 5*7 + 3*11 = 136.
		

Crossrefs

Programs

  • Mathematica
    Table[With[{c=Prime[Range[2,n]]},ListConvolve[c,c]],{n,2,40}]//Flatten (* Harvey P. Dale, Apr 25 2016 *)
  • PARI
    conv(n)=local(v,s); v=primes(n+1); s=0; for(i=2, length(v), s+=v[i]*v[length(v)-i+2]); s
    for(n=1,40,print1(conv(n)","))
    
  • Python
    from numpy import convolve
    from sympy import prime, primerange
    def aupton(terms):
        p = list(primerange(3, prime(terms+1)+1))
        return list(convolve(p, p))[:terms]
    print(aupton(40)) # Michael S. Branicky, Sep 30 2021

Formula

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

A338816 a(0) = 1; for n > 0, a(n) = Sum_{k=0..n-1} prime(a(k)) * prime(a(n-k-1)).

Original entry on oeis.org

1, 4, 28, 477, 15054, 716619, 46386636, 3829544473, 386956394842, 46498297487679, 6503866348955704, 1041432998153210277, 188367392877258840974
Offset: 0

Views

Author

Ilya Gutkovskiy, Nov 10 2020

Keywords

Crossrefs

Programs

  • Mathematica
    a[0] = 1; a[n_] := a[n] = Sum[Prime[a[k]] Prime[a[n - k - 1]], {k, 0, n - 1}]; Table[a[n], {n, 0, 9}]

Formula

G.f.: 1 + x * (Sum_{n>=0} prime(a(n)) * x^n)^2.

Extensions

a(10)-a(11) from Daniel Suteu, Nov 10 2020
a(12) from Jinyuan Wang, Nov 14 2020

A067773 a(n) is the unique positive integer m which has a self-conjugate partition whose parts are the first n primes.

Original entry on oeis.org

4, 8, 17, 29, 53, 77, 117, 157, 217, 289, 369, 469, 585, 713, 849, 1025, 1197, 1393, 1617, 1845, 2113, 2373, 2661, 2973, 3321, 3681, 4045, 4481, 4865, 5285, 5793, 6253, 6785, 7341, 7949, 8513, 9169, 9765, 10473, 11233, 11969, 12733, 13541, 14337
Offset: 1

Views

Author

Naohiro Nomoto, Feb 06 2002

Keywords

Comments

In general, given a finite set of positive integers p(1) < ... < p(n), there's a unique self-conjugate partition using these parts; p(n) occurs p(1) times and p(n-i) occurs p(i+1)-p(i) times for 1<=i

Examples

			2+2 = 4; 2+3+3 = 8; 2+2+3+5+5 = 17; ....
		

Crossrefs

Programs

  • Mathematica
    a[n_] := 2Prime[n]+Sum[Prime[n-i](Prime[i+1]-Prime[i]), {i, 1, n-1}]

Formula

a(n) = 2 prime(n) + Sum_{i=1..n-1} prime(n-i)*(prime(i+1)-prime(i)) = A014342(n-1) - A014342(n-2).

Extensions

Edited by Dean Hickerson, Feb 12 2002

A316186 Expansion of e.g.f. P(P(x)), where P(x) = Sum_{k>=1} prime(k)*x^k/k!.

Original entry on oeis.org

4, 18, 104, 687, 5064, 40934, 358083, 3346832, 33123000, 345219919, 3777134694, 43291666298, 518855171115, 6491738816768, 84656365477452, 1148895613585775, 16201725990730392, 237030534528945348, 3591398122456079285, 56254812062478841340, 909319044063443870702
Offset: 1

Author

Ilya Gutkovskiy, Jun 26 2018

Keywords

Comments

Self-composition of e.g.f. of A000040 (prime numbers).

Examples

			E.g.f.: A(x) = 4*x + 18*x^2/2! + 104*x^3/3! + 687*x^4/4! + 5064*x^5/5! + 40934*x^6/6! + ...
		

Crossrefs

Programs

  • Mathematica
    p[x_] := p[x] = Sum[Prime[k] x^k/k!, {k, 21}]; a[n_] := a[n] = SeriesCoefficient[p[p[x]], {x, 0, n}]; Table[n! a[n], {n, 21}]

A363655 a(0) = 1; for n > 0, a(n) = prime( Sum_{k=0..n-1} a(k) * a(n-k-1) ).

Original entry on oeis.org

1, 2, 7, 61, 863, 17569, 472741, 16007419, 659408567, 32231133931, 1833425773489, 119498316410171, 8810846732918257, 727089137774221667
Offset: 0

Author

Ilya Gutkovskiy, Jun 13 2023

Keywords

Programs

  • Mathematica
    a[0] = 1; a[n_] := a[n] = Prime[Sum[a[k] a[n - k - 1], {k, 0, n - 1}]]; Table[a[n], {n, 0, 11}]

Formula

G.f.: sqrt( Sum_{n>=0} index of prime a(n+1) * x^n ).

Extensions

a(12)-a(13) from Amiram Eldar, Jun 13 2023
Previous Showing 21-29 of 29 results.