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

A172973 Partial sums of A048890.

Original entry on oeis.org

19, 80, 189, 388, 989, 1650, 2669, 3730, 4821, 5930, 7111, 8712, 10321, 11990, 13689, 15500, 17401, 19400, 25411, 31502, 37603, 43802, 50421, 57082, 63771, 70462, 77361, 84352, 94413, 104482, 114573, 125264, 136125, 147034, 158103, 169784
Offset: 1

Views

Author

Jonathan Vos Post, Feb 06 2010

Keywords

Crossrefs

Cf. A048890.

Extensions

a(24) corrected by Georg Fischer, Aug 29 2020

A080788 Primes that are still primes when turned upsided down.

Original entry on oeis.org

11, 19, 61, 101, 109, 181, 199, 601, 619, 661, 1019, 1061, 1091, 1109, 1181, 1601, 1609, 1669, 1699, 1811, 1901, 1999, 6011, 6091, 6101, 6199, 6619, 6661, 6689, 6691, 6899, 6991, 10061, 10069, 10091, 10691, 10861, 10909, 11069, 11681, 11909, 16001, 16091
Offset: 1

Views

Author

P. Giannopoulos (pgiannop1(AT)yahoo.com), Mar 12 2003

Keywords

References

  • P. Giannopoulos, The Brainteasers, unpublished.

Crossrefs

Programs

  • Haskell
    import Data.List (unfoldr)
    a048890 n = a048890_list !! (n-1)
    a048890_list = filter f a000040_list where
       f x = all (`elem` [0,1,6,8,9]) ds && x' /= x && a010051 x' == 1
         where x' = foldl c 0 ds
               c v 6 = 10*v + 9; c v 9 = 10*v + 6; c v d = 10*v + d
               ds = unfoldr d x
               d z = if z == 0 then Nothing else Just $ swap $ divMod z 10
    -- Reinhard Zumkeller, Nov 18 2011
    
  • Python
    from sympy import isprime
    from itertools import product
    def ud(s):
        return s[::-1].translate({ord('6'):ord('9'), ord('9'):ord('6')})
    def auptod(maxdigits):
        alst = []
        for d in range(1, maxdigits+1):
            for p in product("01689", repeat=d-1):
                if d > 1 and p[0] == "0": continue
                for end in "19":
                    s = "".join(p) + end
                    t, udt = int(s), int(ud(s))
                    if isprime(t) and isprime(udt): alst.append(t)
        return alst
    print(auptod(5)) # Michael S. Branicky, Nov 19 2021

Extensions

Missing 1669 and 6689 inserted by Reinhard Zumkeller, Nov 18 2011

A317179 Palindromic invertible primes.

Original entry on oeis.org

16661, 19991, 1160611, 1190911, 1688861, 1988891, 101616101, 101919101, 106111601, 106191601, 109111901, 109161901, 116010611, 116696611, 119010911, 119969911, 160080061, 160101061, 166080661, 169060961, 188868881, 188898881, 190080091, 190101091, 196090691, 199080991
Offset: 1

Views

Author

K. D. Bajpai, Jul 23 2018

Keywords

Comments

a(38) = 10886968801 is the first term that uses all of the invertible digits (0, 1, 6, 8, 9).
Number of terms < 10^(2k-1): 0, 0, 2, 6, 26, 78, 314, 1010, 3976, 15174, ..., . - Robert G. Wilson v, Jul 24 2018
Intersection of A002385 and A048890, or, respectively, A002113 and A048890. - Felix Fröhlich, Jul 24 2018

Examples

			16661 is a term because it is a prime and a palindrome as well; when rotated by 180 degrees it becomes 19991 that is also a prime.
		

Crossrefs

Programs

  • Mathematica
    Select[ lst = {}; fQ[n_] :=  Block[{allset = {0, 1, 6, 8, 9}, id = IntegerDigits@n},  rid = Reverse[id /. {6 -> 9, 9 -> 6}];Union@Join[id, allset] == allset && PrimeQ@FromDigits@rid &&  rid != id]; Do[If[PrimeQ@n && fQ@n,  AppendTo[lst, n]], {n, 1090000000}]; lst, # ==FromDigits[Reverse[IntegerDigits[#]]]  &]
  • PARI
    is_palandinv(n) = my(d=digits(n), ineligible_d=[2, 3, 4, 5, 7]); d==Vecrev(d) && #setintersect(vecsort(d), ineligible_d)==0
    invert(n) = my(d=digits(n), e=[]); for(k=1, #d, if(d[k]==0, e=concat(e, [0])); if(d[k]==1, e=concat(e, [1])); if(d[k]==6, e=concat(e, [9])); if(d[k]==8, e=concat(e, [8])); if(d[k]==9, e=concat(e, [6]))); subst(Pol(e), x, 10)
    is(n) = my(d=digits(n)); is_palandinv(n) && n!=invert(n) && ispseudoprime(invert(n))
    forprime(p=1, 2e8, if(is(p), print1(p, ", "))) \\ Felix Fröhlich, Jul 24 2018

A160452 Invertible primes of the form 1 followed by a string of 9's.

Original entry on oeis.org

19, 199, 1999, 1999999999999999999999999999
Offset: 1

Views

Author

Lekraj Beedassy, May 14 2009

Keywords

Comments

These are values in A055558 whose rotation by 180 degrees occurs in A092571. I have checked all the numbers that correspond to entries in A002957 and can confirm that the next term in this sequence, if it exists, is greater than 2*10^55347-1. [From Dmitry Kamenetsky, May 22 2009]

Examples

			1999, for instance, is a prime which rotated upside down through 180 degrees becomes the prime 6661. Hence 1999 is in the sequence.
		

Crossrefs

Cf. A092571, A002957. [From Dmitry Kamenetsky, May 22 2009]

A317029 Invertible primes p such that k*p - 1 and k*p + 1 is a twin prime pair; for k = 12.

Original entry on oeis.org

19, 601, 1601, 16661, 16981, 19609, 60689, 66809, 69001, 69011, 100169, 119191, 189901, 196919, 616961, 1061689, 1088089, 1091119, 1106069, 1196089, 1198069, 1611601, 1666019, 1688969, 1800119, 1861889, 1891619, 1891661, 1910669, 1996681, 6060091, 6160601, 6196909
Offset: 1

Views

Author

K. D. Bajpai, Jul 19 2018

Keywords

Comments

Intersection of A048890 (invertible primes) and A138242.
k = 12 is the smallest integer to produce such sequence.

Examples

			a(2) = 601 is an invertible prime; 12*601 - 1 = 7211; 12*601 + 1 = 7213; 7211 and 7213 form a twin prime pair.
a(4) = 16661 is an invertible prime; 12*16661 - 1 = 199931; 12*16661 + 1 = 199933; 199931 and 199933 form a twin prime pair.
		

Crossrefs

Programs

  • Mathematica
    k = 12; Select[lst = {};
    fQ[n_] := Block[{allset = {0, 1, 6, 8, 9}, id = IntegerDigits@n}, rid = Reverse[id /. {6 -> 9, 9 -> 6}];Union@Join[id, allset] == allset && PrimeQ@FromDigits@rid && rid != id];Do[If[PrimeQ@n && fQ@n, AppendTo[lst, n]], {n, 12000000}]; lst,
    PrimeQ[k# + 1] && PrimeQ[k# - 1] &]
Showing 1-5 of 5 results.