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 31-40 of 40 results.

A282462 Integers but with the primes cubed.

Original entry on oeis.org

0, 1, 8, 27, 4, 125, 6, 343, 8, 9, 10, 1331, 12, 2197, 14, 15, 16, 4913, 18, 6859, 20, 21, 22, 12167, 24, 25, 26, 27, 28, 24389, 30, 29791, 32, 33, 34, 35, 36, 50653, 38, 39, 40, 68921, 42, 79507, 44, 45, 46, 103823, 48, 49, 50, 51, 52, 148877, 54, 55, 56
Offset: 0

Views

Author

Vincenzo Librandi, Feb 17 2017

Keywords

Examples

			a(4) = 4 because 4 is composite.
a(5) = 125 because 5 is prime and 5^3 = 125.
		

Crossrefs

Programs

  • Magma
    [0] cat [IsPrime(n) select n^3 else n: n in [1..60]];
  • Mathematica
    Join[{0},If[PrimeQ@#,#^3,#]&/@Range@80]

A351369 a(n) = Sum_{p|n, p prime} p * prime(p).

Original entry on oeis.org

0, 6, 15, 6, 55, 21, 119, 6, 15, 61, 341, 21, 533, 125, 70, 6, 1003, 21, 1273, 61, 134, 347, 1909, 21, 55, 539, 15, 125, 3161, 76, 3937, 6, 356, 1009, 174, 21, 5809, 1279, 548, 61, 7339, 140, 8213, 347, 70, 1915, 9917, 21, 119, 61, 1018, 539, 12773, 21, 396, 125, 1288, 3167
Offset: 1

Views

Author

Wesley Ivan Hurt, Feb 08 2022

Keywords

Comments

Inverse Möbius transform of n * prime(n) * c(n), where c(n) is the characteristic function of primes (A010051). - Wesley Ivan Hurt, Apr 01 2025

Examples

			a(6) = 21; a(6) = Sum_{p|6} p * prime(p) = 2*3 + 3*5 = 21.
		

Crossrefs

Programs

  • Mathematica
    Join[{0},Table[Total[# Prime[#]&/@FactorInteger[n][[;;,1]]],{n,2,80}]] (* Harvey P. Dale, Jan 28 2024 *)

Formula

a(n) = Sum_{d|n} d * prime(d) * c(d), where c = A010051. - Wesley Ivan Hurt, Apr 01 2025
a(p^k) = p * prime(p) for p prime and k>=1. - Wesley Ivan Hurt, Jul 16 2025

A359177 Product_{n>=1} (1 + a(n) * x^n) = 1 + Sum_{n>=1} prime(n) * x^prime(n).

Original entry on oeis.org

0, 2, 3, 0, -1, 0, 9, 3, -18, -27, 38, 63, 3, -132, -54, 200, 395, -258, -666, 336, 2111, 836, -3454, -4020, 9290, 14408, 1215, -43886, -13043, 92456, 155854, -162756, -396316, 43971, 1201705, 442641, -1922050, -3359287, 3887946, 9202219, 529036, -24727323, -11980753, 48090463
Offset: 1

Views

Author

Seiichi Manyama, Dec 28 2022

Keywords

Crossrefs

A259182 a(n) = prime(n) if n prime otherwise 1.

Original entry on oeis.org

1, 3, 5, 1, 11, 1, 17, 1, 1, 1, 31, 1, 41, 1, 1, 1, 59, 1, 67, 1, 1, 1, 83, 1, 1, 1, 1, 1, 109, 1, 127, 1, 1, 1, 1, 1, 157, 1, 1, 1, 179, 1, 191, 1, 1, 1, 211, 1, 1, 1, 1, 1, 241, 1, 1, 1, 1, 1, 277, 1, 283, 1, 1, 1, 1, 1, 331, 1, 1, 1, 353, 1, 367, 1, 1, 1, 1
Offset: 1

Views

Author

Vincenzo Librandi, Jun 20 2015

Keywords

Comments

The subsequence of prime terms is A006450.

Examples

			a(7) = 17 because prime(7) = 17 is prime.
a(8) = 1 because 8 is not prime.
		

Crossrefs

Programs

  • Magma
    [IsPrime(n) select NthPrime(n) else 1: n in [1..100]];
  • Mathematica
    Table[If[! PrimeQ[n], 1, Prime[n]], {n, 100}]

A277186 Sum of primes within 2n-wide closed interval centered upon prime(n).

Original entry on oeis.org

5, 10, 17, 26, 31, 67, 83, 83, 119, 139, 161, 228, 281, 281, 341, 408, 474, 553, 546, 635, 635, 780, 824, 1092, 954, 1008, 1008, 1139, 1197, 1336, 1621, 1687, 1650, 1823, 1854, 1854, 2238, 2634, 2507, 2587, 2450, 2673, 3223, 3223, 3403, 3403, 3591, 4054, 4054, 4331, 4535, 4535, 4828, 4444, 4666
Offset: 1

Views

Author

Walter Carlini, Oct 04 2016

Keywords

Comments

a(n) is the sum of primes within the closed interval [prime(n)-n, prime(n)+n], where prime(n) is the n-th prime.

Examples

			a(3) = 2 + 3 + 5 + 7 = 17; starting at prime(3) = 5, subtract 3 and add 3 to obtain the interval 2 through 8, and then add up the primes within that interval, inclusive of the endpoints of the interval.
		

Crossrefs

Programs

  • Mathematica
    Table[Total@ Select[Range[Prime@ n - n, Prime@ n + n], PrimeQ], {n, 55}] (* Michael De Vlieger, Oct 04 2016 *)
  • PARI
    a(n) = sum(k=prime(n)-n, prime(n)+n, isprime(k)*k); \\ Michel Marcus, Nov 01 2016

Extensions

More terms from Michael De Vlieger, Oct 04 2016

A300692 Primes that are the sum of all primes up to some power of 2.

Original entry on oeis.org

2, 5, 17, 41, 202288087, 4394533064208947008756469709307
Offset: 1

Views

Author

Christoph Zurnieden, Apr 03 2018

Keywords

Comments

Elements in the sequence are certified primes.
The corresponding exponents of 2 are 1, 2, 3, 4, 16 and 54.

Examples

			17 is a term because the sum of all primes below 2^3 is 2+3+5+7 = 17 which is prime.
		

Crossrefs

Programs

  • Mathematica
    Select[Array[Total@ Prime@ Range@ PrimePi[2^#] &, 27, 0], PrimeQ] (* Michael De Vlieger, Apr 10 2018 *)
  • PARI
    lista(nn) = {for (n=0, nn, s = 0; forprime(k=0, 2^n, s+=k); if (isprime(s), print1(s, ", ")));}

Formula

Numbers of the form Sum_{i=2..2^n-1} A061397(i) that are prime.

A346180 a(n) = prime(n) + n if n is prime, a(n) = prime(n) otherwise.

Original entry on oeis.org

2, 5, 8, 7, 16, 13, 24, 19, 23, 29, 42, 37, 54, 43, 47, 53, 76, 61, 86, 71, 73, 79, 106, 89, 97, 101, 103, 107, 138, 113, 158, 131, 137, 139, 149, 151, 194, 163, 167, 173, 220, 181, 234, 193, 197, 199, 258, 223, 227, 229, 233, 239, 294, 251, 257, 263, 269, 271
Offset: 1

Views

Author

Samuel Vilz, Jul 09 2021

Keywords

Comments

For n > 0, take the n-th prime and only add n to it if n is prime itself.

Examples

			a(1) = 2 = 2+0; 2 is the first prime. 1 is not prime and thus is not added.
a(2) = 5 = 3+2; 3 is the second prime, and since 2 is also prime, add 2.
a(3) = 8 = 5+3; 5 is the third prime, and since 3 is also prime, add 3.
		

Crossrefs

Programs

  • Mathematica
    Table[Prime@n+Boole@PrimeQ[n]n,{n,60}] (* Giorgos Kalogeropoulos, Jul 29 2021 *)
    Table[If[PrimeQ[n],Prime[n]+n,Prime[n]],{n,60}] (* Harvey P. Dale, Nov 20 2022 *)
  • PARI
    a(n) = prime(n) + isprime(n)*n; \\ Michel Marcus, Jul 12 2021
    
  • Python
    from sympy import isprime, prime
    def a(n): return prime(n) + n*isprime(n)
    print([a(n) for n in range(1, 59)]) # Michael S. Branicky, Jul 29 2021
    
  • Python
    # faster version for initial segment of sequence
    from sympy import isprime, prime, primerange
    def aupton(nn): return [p + n*isprime(n) for n, p in enumerate(primerange(1, prime(nn)+1), start=1)]
    print(aupton(10000)) # Michael S. Branicky, Jul 29 2021

Formula

a(n) = A000040(n) + A061397(n).

A352167 a(n) is the sum of the prime factors of n (with multiplicity) that are less than n.

Original entry on oeis.org

0, 0, 0, 4, 0, 5, 0, 6, 6, 7, 0, 7, 0, 9, 8, 8, 0, 8, 0, 9, 10, 13, 0, 9, 10, 15, 9, 11, 0, 10, 0, 10, 14, 19, 12, 10, 0, 21, 16, 11, 0, 12, 0, 15, 11, 25, 0, 11, 14, 12, 20, 17, 0, 11, 16, 13, 22, 31, 0, 12, 0, 33, 13, 12, 18, 16, 0, 21, 26, 14, 0, 12, 0, 39, 13, 23, 18, 18, 0, 13
Offset: 1

Views

Author

Ilya Gutkovskiy, Mar 06 2022

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := If[n == 1 || PrimeQ[n], 0, Plus @@ Times @@@ FactorInteger@n]; Table[a[n], {n, 80}]
  • PARI
    a(n) = if (isprime(n), 0, my(f=factor(n)); sum(k=1, #f~, f[k,1]*f[k,2])); \\ Michel Marcus, Mar 07 2022

Formula

a(n) = 0 if n is prime, A001414(n) otherwise.
a(n) = A001414(n) - A061397(n).

A354836 Triangle T(n,k) where, if n-k and n+k are prime, T(n,k) = n+k is the greater term of a Goldbach partition of 2n into two odd primes, or zero otherwise.

Original entry on oeis.org

3, 0, 5, 5, 0, 7, 0, 7, 0, 0, 7, 0, 0, 0, 11, 0, 0, 0, 11, 0, 13, 0, 0, 11, 0, 13, 0, 0, 0, 0, 0, 13, 0, 0, 0, 17, 11, 0, 0, 0, 0, 0, 17, 0, 19, 0, 13, 0, 0, 0, 17, 0, 19, 0, 0, 13, 0, 0, 0, 0, 0, 19, 0, 0, 0, 23, 0, 0, 0, 17, 0, 0, 0, 0, 0, 23, 0, 0, 0, 0, 17, 0, 19, 0, 0, 0, 23, 0, 0, 0, 0
Offset: 3

Views

Author

Jean-François Alcover, Jun 12 2022

Keywords

Comments

This sequence has the same structure as A354805, which could be considered as sort of its characteristic function.

Examples

			Triangle begins:
    3;
    0, 5;
    5, 0, 7;
    0, 7, 0, 0;
    7, 0, 0, 0,11;
    0, 0, 0,11, 0,13;
    0, 0,11, 0,13, 0, 0;
    0, 0, 0,13, 0, 0, 0,17;
   11, 0, 0, 0, 0, 0,17, 0,19;
   ...
Example: for n=11, row {11,0,0,0,0,0,17,0,19}, when stripped of its zeros and subtracted from 2n=22, gives the partitions {{11,11},{17,5},{19,3}}.
		

Crossrefs

Cf. A085090 (main diagonal), A061397 (column k=0 prepended with (0,2)), A145091 (column k=1 prepended with (0,2,3,0)), A354805.

Programs

  • Mathematica
    nmin = 3; nmax = 16;
    T[n_ /; n >= nmin, k_ /; k >= 0] := If[PrimeQ[n-k] && PrimeQ[n+k], n+k, 0];
    Table[T[n, k], {n, nmin, nmax}, {k, 0, n - nmin}] // Flatten

A368118 a(n) = ceiling(1/p(n)) if p(n) > 0 otherwise 0, where p(n) = 2*sin(Pi * Gamma(n) / n).

Original entry on oeis.org

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

Views

Author

Peter Luschny, Dec 17 2023

Keywords

Comments

Replacing in the definition '2' by 'n', i.e., defining q(n) = n * sin(Pi * Gamma(n) / n), would make sequence a coincide with the characteristic function of the primes, A010051, since 0 < 1/q(n) < 1 and 1/q(n) -> 1/Pi for prime n -> oo.

References

  • L. E. Dickson, History of the Theory of Numbers. Carnegie Institute Public. 256, Washington, DC, Vol. 1, 1919; Vol. 2, 1920; Vol. 3, 1923, see vol. 1, p. 427.

Crossrefs

Programs

  • Mathematica
    a[n_] := If[(p = 2Sin[Pi*Gamma[n]/n]) > 0, Ceiling[1/p], 0]; Array[a, 84]
    (* Stefano Spezia, Dec 17 2023 *)
  • SageMath
    p = lambda s: 2*sin(pi*gamma(s)/s)
    IsPrime = lambda n: p(n).n() > 0
    def a(n): return ceil(1/p(n).n()) if IsPrime(n) else 0
    print([a(n) for n in range(1, 85)])

Formula

a(n) > 0 if and only if n is prime. If n is not prime then a(n) = 0.
Previous Showing 31-40 of 40 results.