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.

User: Ray G. Opao

Ray G. Opao's wiki page.

Ray G. Opao has authored 134 sequences. Here are the ten most recent ones:

A354523 Number of distinct letters in the English word for n that can also be found in the English word for n+1.

Original entry on oeis.org

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

Author

Ray G. Opao, Aug 16 2022

Keywords

Comments

US English is assumed (i.e., 101 = 'one hundred one' instead of 'one hundred and one').
There are no zero values since min{a(k) | 0 <= k < 1000} = 1 and "nine" and "one" share common letters whenever the initial power name changes. - Michael S. Branicky, Aug 19 2022

Examples

			a(0) = 2 since the letters 'e' and 'o' in 'zero' can also be found in 'one'.
a(11)= 3 since the letters 'e', 'l' and 'v' in 'eleven' can also be found in 'twelve'.
		

Programs

  • Mathematica
    a[n_]:= Length[Intersection[Characters[IntegerName[n]], Characters[IntegerName[n+1]], CharacterRange["a","z"]]]; Array[a,101,0] (* Stefano Spezia, Aug 19 2022 *)
  • Python
    from num2words import num2words as n2w
    def b(n): return set(c for c in n2w(n).replace(" and", "") if c.isalpha())
    def a(n): return len(b(n) & b(n+1))
    print([a(n) for n in range(101)]) # Michael S. Branicky, Aug 19 2022

A354521 a(n) is the position of the first letter in the US English name of n that can also be found in the English name of n+1.

Original entry on oeis.org

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

Author

Ray G. Opao, Aug 16 2022

Keywords

Comments

Spaces and punctuation are ignored when determining the position of the letter.
a(n) is well-defined as n and n+1 always share a letter (see formulas). - Michael S. Branicky, Aug 20 2022

Examples

			For n = 4, a(4) = 1 since the 1st letter of 'four' can also be found in 'five'.
For n = 59, a(59) = 2 since the 2nd letter of 'fifty-nine' can be found in 'sixty'.
		

Programs

  • Python
    from num2words import num2words as n2w
    def a(i):
        w1 = n2w(i).replace(' ','').replace('-','')
        w2 = n2w(i+1).replace(' ','').replace('-','')
        for j in range(len(w1)):
            if w1[j] in w2:
                return j+1

Formula

For n > 1000, a(n) = 1 unless n = b + 1000^e - 1 (for e >= 1, 1 <= b <= 999) in which case a(n) = a(b). Subsequently, 1 <= a(n) <= 3. - Michael S. Branicky, Aug 20 2022

A335732 Emirps whose concatenation of adjacent digit differences either form an emirp that also has this characteristic or form a single-digit prime, and whose emirp also has this characteristic.

Original entry on oeis.org

13, 31, 79, 97, 347, 709, 743, 769, 907, 967, 1847, 7481
Offset: 1

Author

Ray G. Opao, Jun 20 2020

Examples

			7481 is in the list as the concatenation of adjacent digit differences forms an emirp (i.e., |7-4|=3; |4-8|=4; |8-1|=7; which form 347, which is an emirp as 743 is also prime). Furthermore, for 347, |3-4|=1; |4-7|=3; forms 13, which is an emirp as 31 is also prime. Finally, |1-3| = 2, which is prime. This characteristic is also true for the emirp of 7481 which is 1847 (i.e., 1847 forms 743 which forms 31 which finally forms 2).
		

Crossrefs

A subset of A006567.

Programs

  • Python
    from sympy.ntheory import isprime as isp
    i = []
    for a in range(10,1000000):
        if isp(a):
            b = str(a)
            d=[]
            for c in range(0,len(b)-1):
                ee = abs(int(b[c])-int(b[c+1]))
                d.append(str(ee))
            f = ''.join(d)
            g = b[::-1]
            if isp(int(f)) and isp(int(g)):
                if len(b)<3:
                    i.append(b)
                else:
                    if f in i:
                        i.append(b)
    print(','.join(i))

A335731 Bemirps that also interpret 2 and 5 as upside-down forms of each other, assuming a digital font.

Original entry on oeis.org

1061, 1091, 1601, 1901, 10061, 10091, 16001, 19001, 106861, 109891, 110651, 110921, 120121, 121021, 121921, 129011, 129121, 150151, 151051, 151651, 156011, 156151, 168601, 198901, 1022591, 1026521, 1028011, 1055261, 1058011, 1059251, 1069291, 1096561, 1102891, 1105861, 1106881, 1108201, 1108501, 1109881, 1111651
Offset: 1

Author

Ray G. Opao, Jun 20 2020

Keywords

Examples

			110651 is in the list as its upside-down form 110921, and its emirp 156011, and the emirp of its upside-down form 129011, are all primes and uniquely different numbers.
		

Crossrefs

Normal bemirps are defined in A048895.

Programs

  • Python
    from sympy.ntheory import isprime as isp
    def ip(pp):
        rr = []
        for qq in pp:
            if qq=="0" or qq=="1" or qq=="8":
                rr.append(qq)
            elif qq=="2":
                rr.append("5")
            elif qq=="5":
                rr.append("2")
            elif qq=="6":
                rr.append("9")
            elif qq=="9":
                rr.append("6")
        return "".join(rr)
    for bb in range(1,10000000):
        if isp(bb):
            bb = str(bb)
            if ("7" not in bb) and ("4" not in bb) and ("3" not in bb):
                cc = bb[::-1]
                dd = ip(bb)
                ee = ip(cc)
                if bb!=cc and dd!=ee and bb!=dd and bb!=ee and cc!=dd and cc!=ee and isp(int(cc)) and isp(int(dd)) and isp(int(ee)):
                    print(bb)

A247849 Apollo missions that landed humans on the moon.

Original entry on oeis.org

11, 12, 14, 15, 16, 17
Offset: 1

Author

Ray G. Opao, Sep 25 2014

Keywords

A247846 Initial primes in the prime quadruplets generated by A247845.

Original entry on oeis.org

11, 3895757051, 31975161851, 68129352251, 175683369311, 188170293791, 255637427231, 767561723231, 1400284088891, 1888909389371, 2627368679051, 3908473644191
Offset: 1

Author

Ray G. Opao, Sep 25 2014

Keywords

Comments

Subsequence of A007530. - Michel Marcus, Sep 26 2014

Examples

			11 is the lesser member of the prime quadruplet 5^2-2*5-4=11; 5^2-2*5-2=13; 5^2-2*5+2=17; and, 5^2-2*5+4=19.
		

Crossrefs

Cf. A007530 (lesser members of prime quadruplets), A247845.

A247882 Numbers, p, that generate the prime quadruplets p^2-2p+2k (for k = -2, -1, 1, 2).

Original entry on oeis.org

5, 15, 705, 2795, 14105, 18645, 38547, 43485, 53915, 57957, 62417, 76287, 82355, 94445, 96657, 145937, 162605, 178817, 180677, 184877, 193625, 234017, 238887, 256557, 261017, 287835, 297815, 334007, 339525, 346425, 387297, 399387, 407145, 417597, 418845, 419147
Offset: 1

Author

Ray G. Opao, Sep 25 2014

Keywords

Comments

For a subset of this list, restricted only to primes, see A247845.
All terms == 5 or 7 (mod 10). - Robert Israel, Mar 10 2025

Examples

			5 is in the sequence as it generates the prime quadruplet 5^2-2*5-4=11; 5^2-2*5-2=13; 5^2-2*5+2=17; and, 5^2-2*5+4=19.
		

Crossrefs

Cf. A247845 (subsequence of primes).

Programs

  • Maple
    filter:= p -> andmap(isprime, [p^2-2*p-4,p^2-2*p-2,p^2-2*p+2,p^2-2*p+4]):
    select(filter, [seq(seq(10*i+j,j=[5,7]),i=0..10^6)]);
  • PARI
    lista(nn) = {vk = [-2, -1, 1, 2]; for (p = 2, nn, nb = 0; for (k = 1, 4, nb += isprime(p^2-2*p+2*vk[k]);); if (nb == 4, print1(p, ", ")););} \\ Michel Marcus, Sep 26 2014

Extensions

More terms from Michel Marcus, Sep 26 2014

A247863 Initial primes in the prime quadruplets generated by A247862.

Original entry on oeis.org

11, 101, 300491, 61820577884902511, 348769459612079711, 427950243745391951, 668482766088635621, 2099202306201150041
Offset: 1

Author

Ray G. Opao, Sep 25 2014

Keywords

Comments

Subsequence of A007530. - Michel Marcus, Sep 26 2014

Crossrefs

Cf. A007530 (lesser of prime quadruplets), A247862.

Extensions

Added a(8). - Wolfdieter Lang, Oct 16 2014

A247862 Primes p that generate the prime quadruplets p^3-4p+2k (for k = -2, -1, 1, 2).

Original entry on oeis.org

3, 5, 67, 395407, 703903, 753583, 874373, 1280417, 1386977, 2920543, 3459487, 3697927, 3905527, 4384543, 4524427, 5630503, 6289343, 6379517, 7882873, 8599993, 8805653
Offset: 1

Author

Ray G. Opao, Sep 25 2014

Keywords

Examples

			5^3-4*5-4=101, 5^3-4*5-2=103, 5^3-4*5+2=107, 5^3-4*5+4=109 is a prime quadruplet, so 5 is in the sequence.
		

Crossrefs

Cf. A247863.

Programs

  • Mathematica
    Select[Prime[Range[600000]],AllTrue[#^3-4#+2{-2,-1,1,2},PrimeQ]&] (* Harvey P. Dale, Feb 16 2024 *)
  • PARI
    lista(nn) = {forprime(p=2, nn, pp = p^3-4*p; if (isprime(pp-4) && isprime(pp-2) && isprime(pp+2) && isprime(pp+4), print1(p, ", ")););} \\ Michel Marcus, Oct 10 2014

Extensions

a(8)-a(21) from Michel Marcus, Oct 10 2014

A247845 Primes, p, that generate the prime quadruplets, p^2-2p+2k (for k = -2, -1, 1, 2).

Original entry on oeis.org

5, 62417, 178817, 261017, 419147, 433787, 505607, 876107, 1183337, 1374377, 1620917, 1976987, 3619607, 4146377, 5260487, 5622047, 6399677, 7166147, 7213847, 7743647, 8055167, 10615967, 13277717, 14042117, 14080277, 15331397, 17433407, 17889587, 17963867
Offset: 1

Author

Ray G. Opao, Sep 25 2014

Keywords

Comments

Except for a(1), all other terms in the sequence end in 7.
For a similar list not restricted to primes, see A247882.

Examples

			5 is in the sequence as it generates the prime quadruplet 5^2-2*5-4=11; 5^2-2*5-2=13; 5^2-2*5+2=17; and, 5^2-2*5+4=19.
		

Crossrefs

Cf. A247846 (lesser of prime quadruplets), A247882 (similar but not restricted to primes).

Programs

  • Magma
    [p: p in PrimesUpTo(10^7) |IsPrime(p^2-2*p-4) and IsPrime(p^2-2*p-2)and IsPrime(p^2-2*p+2)and IsPrime(p^2-2*p+4)]; // Vincenzo Librandi, Oct 14 2014
  • PARI
    lista(nn) = {vk = [-2, -1, 1, 2]; forprime (p=2, nn, nb = 0; for (k=1, 4, nb += isprime(p^2-2*p+2*vk[k]);); if (nb == 4, print1(p, ", ")););} \\ Michel Marcus, Sep 26 2014
    

Extensions

More terms from Michel Marcus, Oct 10 2014