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-10 of 21 results. Next

A057698 Prime lucky numbers k (from A031157) such that nextprime(k)=nextlucky(k).

Original entry on oeis.org

997, 1117, 1459, 2467, 3301, 3307, 3607, 3931, 4561, 4993, 6373, 6871, 7951, 8263, 8641, 9631, 9643, 9649, 10891, 10903, 11953, 12379, 12547, 15901, 17047, 19603, 20089, 20551, 21739, 21751, 23671, 24481, 25147, 28837, 29599, 31033, 31039
Offset: 1

Views

Author

Naohiro Nomoto, Oct 22 2000

Keywords

Crossrefs

Extensions

Terms beyond a(25) via b000959.txt from R. J. Mathar, Oct 22 2010
Offset changed to 1 by Michel Marcus, Sep 07 2018

A057609 Powers of a prime lucky number (A031157) but excluding lucky numbers (A000959).

Original entry on oeis.org

27, 81, 243, 343, 1849, 2197, 2401, 4489, 5329, 6241, 6561, 16129, 16807, 19683, 22801, 26569, 28561, 37249, 44521, 49729, 58081, 59049, 79507, 80089, 94249, 109561, 117649, 134689, 177147, 177241, 187489, 214369, 237169, 361201, 371293, 375769, 383161, 389017
Offset: 1

Views

Author

Naohiro Nomoto, Oct 09 2000

Keywords

Comments

Up to 10^7, terms are 3^3, 3^4, 3^5, 3^8, 3^9, 3^10, 3^11, 3^12, 3^13, 7^3, 7^4, 7^5, 7^6, 13^3, 13^4, 13^5, 13^6, 31^4, 43^2, 43^3, 43^4, 67^2, ..., . - Robert G. Wilson v, May 12 2006

Examples

			In the first 23 terms of A000959, {1, 3, 7, 9, 13, 15, 21, 25, 31, 33, 37, 43, 49, 51, 63, 67, 69, 73, 75, 79, 87, 93, 99}, 3 is a prime lucky number (A031157), and 3^2 is also a lucky number, but 3^3=27 and 3^4=81 are not lucky numbers, so they are terms of this sequence.
		

Crossrefs

Programs

  • Mathematica
    lst = Range[1, 2*10^6, 2]; i = 2; While[i <= (len = Length[lst]) && (k = lst[[i]]) <= len, lst = Drop[lst, {k, len, k}]; i++ ]; m = Last@ lst; Complement[ Reap[ Do[ If[x^2 > m, Break[]]; If[PrimeQ[x], y = x^2; While[y <= m, Sow@ y; y *= x]], {x, lst}]] [[2, 1]], lst] (* Robert G. Wilson v, May 12 2006, corrected by Giovanni Resta, May 10 2020 *)

Extensions

More terms from Robert G. Wilson v, May 12 2006
Data corrected and extended by Giovanni Resta, May 10 2020

A057768 From Goldbach problem: number of decompositions of 2n-1 into sum of a prime lucky number(from A031157) and a twin even-lucky-number(from A045955, A045956).

Original entry on oeis.org

0, 0, 1, 1, 2, 1, 2, 2, 2, 2, 1, 2, 3, 1, 1, 1, 2, 2, 2, 2, 3, 3, 2, 4, 5, 2, 3, 4, 4, 2, 2, 2, 3, 2, 1, 3, 4, 3, 4, 4, 4, 4, 5, 3, 3, 3, 2, 2, 2, 2, 4, 2, 3, 3, 3, 3, 3, 3, 3, 2, 4, 3, 2, 2, 4, 4, 4, 3, 4, 3, 3, 4, 5, 4, 3, 3, 4, 3, 3, 1, 5, 4, 2, 3, 6, 4, 5, 5, 4, 4, 6, 4, 5, 3, 1, 2, 3, 4, 5, 4, 3, 5, 6, 3, 3
Offset: 0

Views

Author

Naohiro Nomoto, Nov 01 2000

Keywords

Comments

Conjecture: this sequence is always positive (with n>2).

Examples

			1 and 3 are not the sum of a prime lucky number and a twin even-lucky-number, so a(1) = a(2) = 0; 5=3+2 (one way, so a(3)=1); 7=3+4 (so a(4)=1); 9=3+6=7+2 (so a(5)=2); etc.
		

Crossrefs

A031879 Nonprime lucky numbers.

Original entry on oeis.org

1, 9, 15, 21, 25, 33, 49, 51, 63, 69, 75, 87, 93, 99, 105, 111, 115, 129, 133, 135, 141, 159, 169, 171, 189, 195, 201, 205, 219, 231, 235, 237, 259, 261, 267, 273, 285, 289, 297, 303, 319, 321, 327, 339, 357, 361, 385, 391, 393, 399, 415, 427
Offset: 1

Views

Author

Keywords

Crossrefs

Intersection of A000959 and A018252.
Cf. A031157.

Extensions

Name corrected by Giovanni Resta, Jun 20 2016

A309334 Lucky prime gaps: differences between consecutive lucky primes.

Original entry on oeis.org

4, 6, 18, 6, 6, 24, 6, 6, 48, 24, 12, 30, 18, 12, 18, 42, 24, 24, 18, 18, 42, 12, 12, 30, 24, 54, 36, 24, 12, 6, 12, 12, 30, 54, 12, 30, 18, 36, 60, 54, 54, 6, 12, 12, 18, 48, 6, 24, 6, 78, 30, 18, 42, 12, 156, 12, 72, 24, 12, 18, 66, 30, 30, 54, 24, 30, 48, 54
Offset: 1

Views

Author

Hauke Löffler, Jul 24 2019

Keywords

Comments

Since (except for 3) all lucky primes == 1 (mod 6), a(n) >= 6 for n >= 2. - Robert Israel, Jul 26 2019

Examples

			a(1) = 4 because difference between the first (3) and second (7) lucky prime is 4.
a(2) = 6 because difference between 7 and 13 is 6.
		

Crossrefs

Programs

  • Maple
    N:= 10^4: # for lucky primes up to 2*N+1
    L:= [seq(2*i+1, i=0..N)]:
    for n from 2 while n < nops(L) do
      r:= L[n];
      L:= subsop(seq(r*i=NULL, i=1..nops(L)/r), L);
    od:
    LP:= select(isprime,L):
    LP[2..-1]-LP[1..-2]; # Robert Israel, Jul 26 2019
  • SageMath
    [A031157[i+1]-A031157[i] for i in range(100)]

Formula

a(n) = A031157(n+1) - A031157(n).

A128538 Number of prime factors (with multiplicity) of lucky numbers.

Original entry on oeis.org

0, 1, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 2, 2, 3, 1, 2, 1, 3, 1, 2, 2, 3, 3, 2, 2, 1, 2, 2, 4, 2, 1, 2, 1, 2, 3, 4, 1, 3, 2, 2, 1, 2, 1, 3, 2, 2, 1, 2, 3, 2, 3, 1, 3, 2, 4, 2, 1, 2, 2, 2, 1, 2, 1, 3, 2, 1, 3, 2, 2, 3, 1, 2, 1, 2, 3, 1, 2, 1, 3, 3, 3, 1, 2, 4, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 2, 2, 2, 1, 1, 3, 1, 4, 1, 3
Offset: 1

Views

Author

Jonathan Vos Post, May 07 2007

Keywords

Comments

a(n) = 0 iff n = 1. a(n) = 1 iff n-th lucky number is prime iff A000959(n) is in A031157 Numbers that are both lucky and prime. a(n) > 1 iff n-th lucky number is composite iff A000959(n) is in A031879 Composite lucky numbers [technically, A031879 should not begin with 1]. a(n) = 2 iff n-th lucky number is semiprime iff A000959(n) is in A001358. a(n) = 3 iff n-th lucky number has 3 prime factors (with multiplicity) iff A000959(n) is in A014612.

Crossrefs

Programs

  • Mathematica
    L = Table[2*i + 1, {i, 0,400}]; For[n = 2, n < Length[L], r = L[[n++]]; L = ReplacePart[L, Table[r*i -> Nothing, {i, 1, Length[L]/r}]]];PrimeOmega/@L (* James C. McMahon, Jan 09 2025 *)

Formula

a(n) = A001222(A000959(n)).

Extensions

More terms from R. J. Mathar, Oct 22 2010

A307008 Numbers that are both prime-indexed primes and lucky-indexed lucky numbers.

Original entry on oeis.org

31, 367, 991, 1087, 1471, 3259, 3559, 5851, 6661, 6841, 8719, 9661, 10723, 11953, 13513, 18181, 20341, 21529, 22651, 23563, 25057, 31189, 39451, 70207, 72727, 75937, 81931, 85843, 87931, 92569, 93169, 108643, 131071, 136483, 143797, 149503, 150991, 163309
Offset: 1

Views

Author

Amiram Eldar, Mar 19 2019

Keywords

Comments

Intersection of A006450 and A032639.

Crossrefs

Programs

  • Mathematica
    m = 10^4; L = Table[2*i + 1, {i, 0, m}]; For[n = 2, n < Length[L], r = L[[n++]]; L = ReplacePart[L, Table[r*i -> Nothing, {i, 1, Length[L]/r}]]]; ll = L[[Select[L, # <= Length[L] &]]]; pp = Prime@ Prime@ Range@ PrimePi@ PrimePi@ (2m); Intersection[pp,ll] (* after Jean-François Alcover at A000959 and Giovanni Resta at A303403 *)

A307010 Numbers that are prime-indexed primes, lucky-indexed lucky numbers, lucky-indexed primes and prime-indexed lucky numbers.

Original entry on oeis.org

367, 687331, 1983913, 2278033, 2400793, 2760361, 3531247, 5840767, 9429223, 11894593, 13201483, 13371751, 13597357, 13755361, 19782127, 24772663, 25607341, 34723783, 51279127, 56208967, 59215327, 71039257, 74498731, 83170537, 97983187, 109510909, 124762969
Offset: 1

Views

Author

Amiram Eldar, Mar 19 2019

Keywords

Comments

Intersection of A006450, A032639, A032605 and A032606.
Intersection of A307008 and A307009.

Crossrefs

Programs

  • Mathematica
    m = 10^4; L = Table[2*i + 1, {i, 0, m}]; For[n = 2, n < Length[L], r = L[[n++]]; L = ReplacePart[L, Table[r*i -> Nothing, {i, 1, Length[L]/r}]]]; P = Select[ Range[2m], PrimeQ]; lp = L[[Select[P, # <= Length[L] &]]]; pl = P[[Select[L, # <= Length[P] &]]]; pp = P[[Select[P, # <= Length[P] &]]]; ll = L[[Select[L, # <= Length[L] &]]]; Intersection[lp, pl, pp, ll] (* after Jean-François Alcover at A000959 *)

A309333 The number of primes between two consecutive lucky primes, bounds excluded.

Original entry on oeis.org

1, 1, 4, 0, 1, 4, 1, 0, 8, 4, 1, 5, 2, 0, 4, 7, 1, 3, 2, 2, 6, 1, 1, 5, 2, 6, 5, 3, 1, 1, 0, 1, 4, 6, 1, 4, 1, 4, 9, 5, 7, 0, 0, 2, 2, 5, 1, 3, 0, 8, 4, 1, 5, 2, 18, 0, 9, 3, 1, 1, 9, 2, 4, 5, 3, 2, 6, 5, 4, 9, 3, 4, 11, 1, 1, 3, 4, 20, 0, 8, 2, 4, 3, 3, 15, 6
Offset: 1

Views

Author

Hauke Löffler, Jul 24 2019

Keywords

Examples

			a(1): Between the first two lucky primes (3, 7) there is one prime (5).
a(3): Between 13 and 31 there are 4 primes (17, 19, 23, 29).
		

Crossrefs

Programs

  • SageMath
    def count_primes_between(a, b):
      return len(prime_range(a+1, b))
    [count_primes_between(A031157[i], A031157[i+1]) for i in range (len(A031157[0:20])-1)]

A032583 Numbers which are neither prime nor lucky.

Original entry on oeis.org

4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 27, 28, 30, 32, 34, 35, 36, 38, 39, 40, 42, 44, 45, 46, 48, 50, 52, 54, 55, 56, 57, 58, 60, 62, 64, 65, 66, 68, 70, 72, 74, 76, 77, 78, 80, 81, 82, 84, 85, 86, 88, 90, 91, 92, 94, 95, 96, 98, 100, 102, 104, 106, 108
Offset: 1

Views

Author

Patrick De Geest, Apr 15 1998

Keywords

Comments

Except for 2, sequence includes all positive even integers. First odd term is 27. - Alonso del Arte, Jun 20 2017

Crossrefs

Programs

  • Mathematica
    (* First run one of the programs for A000959 to define the list luckies *) max = 200; Complement[Range[max], Prime[Range[PrimePi[max]]], luckies] (* Alonso del Arte, Jun 14 2017 *)
Showing 1-10 of 21 results. Next