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

A154734 Define k(0) = 2 and k(m) = m^2-k(m-1) for m >= 1. This is a list of those terms k(m) for which k(m)+1 and k(m)-1 are both in A008578 (primes including 1).

Original entry on oeis.org

2, 4, 12, 138, 822, 2082, 3918, 21738, 39342, 62130, 70878, 106032, 117372, 129288, 135462, 182712, 512580, 524802, 575130, 682698, 769422, 799482, 893118, 1008912, 1026030, 1043292, 1828830, 2368578, 2447580, 3247428, 3278082, 3465030, 4022868, 4056978
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Maple
    a := proc(n) local k; k := n*(n - 1)/2 - 2*(-1)^n:
    if k = 2 or isprime(k - 1) and isprime(k + 1) then k else NULL fi end:
    seq(a(n), n = 1..1000);  # Peter Luschny, Jul 14 2022
  • Mathematica
    k=2;lst={k};Do[k=n^2-k;If[PrimeQ[k-1]&&PrimeQ[k+1],AppendTo[lst,k]],{n,8!}];lst
  • PARI
    a154734(upto,k0=2) = {my(k=k0); print1(k,", "); for(n=1, oo, my(kk=n^2-k);if(isprime(k-1) && isprime(k+1), print1(k,", ")); k=kk; if(k>upto, break))};
    a154734(5000000) \\ Hugo Pfoertner, Jul 14 2022

Formula

k(n) = n*(n+1)/2+2*(-1)^n. - Peter Luschny, Jul 14 2022

Extensions

Better name from Pontus von Brömssen, Jul 14 2022

A164653 a(1) = 1, for n>=2: a(n) = sum of two consecutive noncomposite numbers A008578.

Original entry on oeis.org

1, 3, 5, 8, 12, 18, 24, 30, 36, 42, 52, 60, 68, 78, 84, 90, 100, 112, 120, 128, 138, 144, 152, 162, 172, 186, 198, 204, 210, 216, 222, 240, 258, 268, 276, 288, 300, 308, 320, 330, 340, 352, 360, 372, 384, 390, 396, 410, 434, 450, 456, 462, 472, 480, 492, 508
Offset: 1

Views

Author

Jaroslav Krizek, Aug 19 2009

Keywords

Comments

Basically these are the sums of two successive primes. - N. J. A. Sloane, Nov 16 2018
Essentially the same as A001043, A011974 and A069102.

Crossrefs

Programs

  • Mathematica
    ListConvolve[{1,1},Join[{0,1},Prime[Range[100]]]] (* Paolo Xausa, Nov 02 2023 *)

Formula

a(n) = A158611(n) + A158611(n+1).
a(n) = A008578(n-1) + A008578(n) for n >= 2.
a(n) = A076273(n-1) + 1 for n >= 2.
a(n) = A000040(n-1) + A008578(n-1) for n >= 2. - Jaroslav Krizek, Dec 13 2009

Extensions

Edited by R. J. Mathar, Aug 21 2009
Correction for change of offset in A158611 and A008578 in Aug 2009 by Jaroslav Krizek, Jan 27 2010
Formulas edited by Paolo Xausa, Nov 04 2023

A175247 Primes (A000040) with noncomposite (A008578) subscripts.

Original entry on oeis.org

2, 3, 5, 11, 17, 31, 41, 59, 67, 83, 109, 127, 157, 179, 191, 211, 241, 277, 283, 331, 353, 367, 401, 431, 461, 509, 547, 563, 587, 599, 617, 709, 739, 773, 797, 859, 877, 919, 967, 991, 1031, 1063, 1087, 1153, 1171, 1201, 1217, 1297, 1409, 1433, 1447
Offset: 1

Views

Author

Jaroslav Krizek, Mar 13 2010

Keywords

Comments

A006450 is the main entry for these numbers. [Arkadiusz Wesolowski, Mar 12 2011]

Examples

			a(5) = 17 because a(5) = p(q(5)) = p(7) = 17, p = prime, q = noncomposite.
		

Crossrefs

Formula

a(n) U A007821(n+1) = A000040(n) for n >= 1. a(n) = prime(noncomposite(n)) = A000040(A008578(n)). a(1) = 2, a(n) = A006450(n-1) for n >= 2.

A175250 Nonprimes (A018252) with noncomposite (A008578) subscripts.

Original entry on oeis.org

1, 4, 6, 9, 12, 18, 21, 26, 28, 34, 42, 45, 52, 57, 60, 65, 74, 81, 84, 91, 95, 98, 106, 112, 119, 128, 133, 135, 141, 143
Offset: 1

Views

Author

Jaroslav Krizek, Mar 13 2010

Keywords

Comments

a(n) = nonprime(noncomposite(n)) = A018252(A008578(n)). a(n) U A102615(n+1) = A018252(n) for n >= 1. a(1) = 1, a(n) = A078782(n-1) = nonprimes (A008578) with prime (A000040) subscripts for n >=2.

Examples

			a(5) = 12 because a(5) = b(q(5)) = b(7) = 12, q = noncomposite, b = nonprime.
		

A255325 Half of the difference between the n-th Ludic number and the n-th noncomposite: a(n) = (A003309(n) - A008578(n))/2.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 2, 1, 0, 3, 2, 1, 2, 3, 4, 4, 5, 5, 6, 8, 6, 7, 9, 9, 9, 9, 10, 11, 15, 11, 13, 12, 17, 13, 14, 12, 15, 21, 19, 21, 21, 18, 20, 19, 20, 18, 17, 19, 24, 25, 24, 30, 28, 28, 33, 31, 33, 32, 36, 38, 34, 35, 36, 38, 40, 38, 39, 36, 36, 39, 37, 35, 36, 42, 42, 43, 42, 46, 44, 42, 44, 43, 47, 48, 49, 52
Offset: 1

Views

Author

Antti Karttunen, Feb 23 2015

Keywords

Crossrefs

Cf. A255324 (the same terms multipled by 2).

Programs

Formula

a(n) = A255324(n)/2 = (A003309(n) - A008578(n))/2.

A256430 The least positive integer in A055744 divisible by A008578(n).

Original entry on oeis.org

1, 4, 18, 50, 294, 1210, 1014, 578, 2166, 58190, 35322, 28830, 8214, 16810, 77658, 5588770, 219102, 4239858, 111630, 1481370, 1058610, 31974, 486798, 2824490, 871310, 56454, 102010, 1082118, 47330166, 71286, 536298, 677418, 6692790, 638146, 146646390, 4928622
Offset: 1

Views

Author

David A. Corneth, Mar 28 2015

Keywords

Comments

Subset of A256431. Elements from this sequence can be used to find elements from A256431. For example, 18 and 50 are the least number in this sequence divisible by 3 and 5 respectively. These numbers can be used to find the least number in A055744 divisible by both 3 and 5 as follows: 18 = 2^1 * 3^2 and 50 = 2^1 * 5^2. 'Order' these factors together: 2^1|2^1|3^2|5^2. For two consecutive factors, if they have the same base, remove the one with the highest exponent. Leaves 2^1|3^2|5^2. Multiply these factors together. Gives 2 * 3^2 * 5^2 = 450. So 450 is in A256431. This method can be applied recursively to find the least n in A055744 divisible by 3, 5 and 7, for example; applying this to 294 and 450 gives 7350 which is the least element in A055744 divisible by primes 3, 5 and 7.

Programs

  • Mathematica
    With[{s = Select[Range[10^6], SameQ @@ Map[FactorInteger[#][[All, 1]] &, {#, EulerPhi@ #}] &]}, TakeWhile[#, IntegerQ] &@ Table[SelectFirst[s, Divisible[#, p] &], {p, {1}~Join~Prime@ Range@ 30}]] (* Michael De Vlieger, Feb 22 2018 *)
  • PARI
    a(n)={my(m=0, p=if(n==1,1,prime(n-1))); until(my(f=factor(m)); f[, 1]==factor(eulerphi(f))[, 1], m+=p); m} \\ Andrew Howroyd, Mar 01 2018

Extensions

a(16), a(18) and other terms corrected by Andrew Howroyd, Mar 01 2018

A289928 p-INVERT of (1,2,3,5,7,11,13,...); i.e., 1 and the primes (A008578), where p(S) = 1 - S - S^2.

Original entry on oeis.org

1, 4, 14, 48, 162, 547, 1842, 6206, 20906, 70438, 237326, 799629, 2694199, 9077599, 30585239, 103051135, 347211149, 1169861760, 3941626163, 13280557904, 44746308037, 150764154490, 507971076799, 1711511703373, 5766612400708, 19429501132982, 65464000013233
Offset: 0

Views

Author

Clark Kimberling, Aug 15 2017

Keywords

Comments

Suppose s = (c(0), c(1), c(2),...) is a sequence and p(S) is a polynomial. Let S(x) = c(0)*x + c(1)*x^2 + c(2)*x^3 + ... and T(x) = (-p(0) + 1/p(S(x)))/x. The p-INVERT of s is the sequence t(s) of coefficients in the Maclaurin series for T(x). Taking p(S) = 1 - S gives the "INVERT" transform of s, so that p-INVERT is a generalization of the "INVERT" transform (e.g., A033453).
See A289780 for a guide to related sequences.

Crossrefs

Programs

  • Mathematica
    z = 60; s = x + Sum[Prime[k] x^(k + 1), {k, 1, z}]; p = 1 - s - s^2;
    Drop[CoefficientList[Series[s, {x, 0, z}], x], 1]  (* A008578 *)
    Drop[CoefficientList[Series[1/p, {x, 0, z}], x] , 1] (* A289928 *)

A023862 a(n) = 1*t(n) + 2*t(n-1) + ... + k*t(n+1-k), where k=floor((n+1)/2) and t = A008578 ({1} U primes).

Original entry on oeis.org

1, 2, 7, 11, 26, 40, 76, 104, 171, 219, 331, 397, 566, 672, 912, 1046, 1369, 1561, 1985, 2223, 2762, 3026, 3688, 4030, 4833, 5215, 6179, 6631, 7764, 8318, 9630, 10270, 11793, 12499, 14245, 15019, 17006, 17930, 20176, 21182, 23701, 24837, 27645, 28965, 32084, 33504
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [1] cat [(&+[j*NthPrime(n-j): j in [1..Floor((n+1)/2)]]): n in [2..50]]; // G. C. Greubel, Jun 12 2019
    
  • Mathematica
    Join[{1}, Table[Sum[j*Prime[n-j], {j,1,Floor[(n+1)/2]}], {n, 2, 50}]] (* G. C. Greubel, Jun 12 2019 *)
  • PARI
    a(n) = sum(j=1, floor((n+1)/2), j*prime(n-j));
    vector(50, n, if(n==1, 1, a(n))) \\ G. C. Greubel, Jun 12 2019
    
  • Sage
    [1]+[sum(j*nth_prime(n-j) for j in (1..floor((n+1)/2))) for n in (2..50)] # G. C. Greubel, Jun 12 2019

Extensions

Title simplified by Sean A. Irvine, Jun 12 2019

A142074 Prime number superposition a(n) = 10*A008578(2n-1) + A008578(2n).

Original entry on oeis.org

12, 35, 81, 147, 213, 321, 411, 477, 589, 677, 783, 873, 987, 1113, 1179, 1257, 1447, 1539, 1667, 1797, 1909, 2001, 2127, 2201, 2457, 2523, 2631, 2767, 2899, 2987, 3093, 3237, 3423, 3501, 3717, 3843, 3957, 4109, 4219, 4371
Offset: 1

Views

Author

Paul Curtz, Sep 15 2008

Keywords

Comments

The two factors 10 and 1 of this linear combination could be replaced by any other pair of integers.

Programs

  • Maple
    A008578 := proc(n) if n = 1 then 1; else ithprime(n-1) ; end if; end proc:
    A142074 := proc(n) 10*A008578(2*n-1)+A008578(2*n) ; end proc: # R. J. Mathar, Jul 07 2011
  • Mathematica
    Join[{12},10#[[1]]+#[[2]]&/@Partition[Prime[Range[2,80]],2]] (* Harvey P. Dale, Aug 11 2017 *)

Formula

a(n) = 10*prime(2n-2)+prime(2n-1), n>1.

A146985 Triangle T(n,m) = f(n-m)*f(n), where f(n) = A008578(n+1).

Original entry on oeis.org

1, 2, 2, 3, 4, 3, 5, 6, 6, 5, 7, 10, 9, 10, 7, 11, 14, 15, 15, 14, 11, 13, 22, 21, 25, 21, 22, 13, 17, 26, 33, 35, 35, 33, 26, 17, 19, 34, 39, 55, 49, 55, 39, 34, 19, 23, 38, 51, 65, 77, 77, 65, 51, 38, 23, 29, 46, 57, 85, 91, 121, 91, 85, 57, 46, 29
Offset: 0

Views

Author

Roger L. Bagula, Nov 04 2008

Keywords

Comments

I call this sequence "symmetrical spooky primes" as two prime combinations are used in cryptography.
Row sums are:{1, 4, 10, 22, 43, 80, 137, 222, 343, 508, 737}. The sequence to Floor[n/2] is a way to get all the combinations of primes with one less than the other.

Examples

			Triangle T(n,m), n, m >= 0 begins:
   1
   2,  2
   3,  4,  3
   5,  6,  6,  5
   7, 10,  9, 10,  7
  11, 14, 15, 15, 14,  11
  13, 22, 21, 25, 21,  22, 13
  17, 26, 33, 35, 35,  33, 26, 17
  19, 34, 39, 55, 49,  55, 39, 34, 19
  23, 38, 51, 65, 77,  77, 65, 51, 38, 23
  29, 46, 57, 85, 91, 121, 91, 85, 57, 46, 29
		

Programs

  • Mathematica
    Clear[f, t, n, m]; f[n_] := If[n == 0, 1, Prime[n]]; t[n_, m_] = f[n - m]*f[m]; Table[t[n, m], {n, 0, 10}, {m, 0, n}]; Flatten[%]

Extensions

Edited by Peter Munn, Jun 29 2023
Previous Showing 31-40 of 595 results. Next