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

A063720 Number of segments lit in a 7-segment display (as on a calculator) to represent the number n, variant 0: '6', '7' and '9' use 5, 3 and 5 segments, respectively.

Original entry on oeis.org

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

Views

Author

Deepan Majmudar (deepan.majmudar(AT)compaq.com), Aug 23 2001

Keywords

Comments

If we mark with * resp. ' the glyph variants (graphical representations) which use more resp. less segments, we have the following variants:
A063720 (this: 6', 7', 9'), A277116 (6*, 7', 9'), A074458 (6*, 7*, 9'), _________________________ A006942 (6*, 7', 9*), A010371 (6*, 7*, 9*). Sequences A234691, A234692 and variants make precise which segments are lit in each digit. These are related through the Hamming weight function A000120, e.g., A010371(n) = A000120(A234691(n)) = A000120(A234692(n)). - M. F. Hasler, Jun 17 2020

Examples

			The number 8 on a digital readout (e.g., on a calculator display) can be represented as
   -
  | |
   -
  | |
   -
which uses all 7 segments. Therefore a(8) = 7.
From _M. F. Hasler_, Jun 17 2020: (Start)
This sequence uses the following representations:
       _       _   _       _       _   _   _
      | |   |  _|  _| |_| |_  |_    | |_| |_|
      |_|   | |_   _|   |  _| |_|   | |_|   |
.
See crossrefs for other variants. (End)
		

Crossrefs

For variants see A006942, A010371, A074458, A277116 (cf. comments).
Other related sequences: A018846, A018847, A018849, A038136, A053701.

Programs

  • Haskell
    a063720 n = a063720_list !! n
    a063720_list = [6,2,5,5,4,5,5,3,7,5] ++ f 10 where
       f x = (a063720 x' + a063720 d) : f (x + 1)
             where (x',d) = divMod x 10
    -- Reinhard Zumkeller, Mar 15 2013
    
  • Mathematica
    a[n_ /; n <= 9] := a[n] = {6, 2, 5, 5, 4, 5, 5, 3, 7, 5}[[n+1]]; a[n_] := a[n] = a[Quotient[n, 10]] + a[Mod[n, 10]]; Table[a[n], {n, 0, 85}] (* Jean-François Alcover, Aug 12 2013, after Reinhard Zumkeller *)
    Table[Total[IntegerDigits[n]/.{0->6,1->2,2->5,3->5,6->5,7->3,8->7,9->5}],{n,0,90}] (* Harvey P. Dale, Mar 27 2021 *)
  • PARI
    apply( {A063720(n)=digits(6255455375)[n%10+1]+if(n>9, self()(n\10))}, [0..99]) \\ M. F. Hasler, Jun 17 2020

Formula

a(n) = a(floor(n/10)) + a(n mod 10) for n > 9. - Reinhard Zumkeller, Mar 15 2013
a(n) <= A277116(n) <= min{A006942(n), A074458(n)} <= A010371(n); differences between these are given, e.g., by A102677(n) - A102679(n) (= number of digits 7 in n). - M. F. Hasler, Jun 17 2020

Extensions

More terms from Matthew Conroy, Sep 13 2001
Definition clarified by M. F. Hasler, Jun 17 2020

A053701 Vertically symmetric numbers.

Original entry on oeis.org

0, 1, 8, 11, 25, 52, 88, 101, 111, 181, 205, 215, 285, 502, 512, 582, 808, 818, 888, 1001, 1111, 1251, 1521, 1881, 2005, 2115, 2255, 2525, 2885, 5002, 5112, 5252, 5522, 5882, 8008, 8118, 8258, 8528, 8888, 10001, 10101, 10801, 11011, 11111, 11811
Offset: 1

Views

Author

Henry Bottomley, Feb 14 2000

Keywords

Comments

Numbers that are symmetric about a vertical mirror.
2 and 5 are taken as mirror images (as on calculator displays).

Crossrefs

Cf. A000787, A007284, A018846 (strobogrammatic numbers).

Programs

  • Maple
    compdig := proc(n) if(n=2)then return 5: elif(n=5)then return 2: elif(n=0 or n=1 or n=8)then return n: else return -1: fi: end: isA053701 := proc(n) local d,l,j: d:=convert(n,base,10): l:=nops(d): for j from 1 to ceil(l/2) do if(not d[j]=compdig(d[l-j+1]))then return false: fi: od: return true: end: for n from 0 to 10000 do if(isA053701(n))then printf("%d, ",n): fi: od: # Nathaniel Johnston, May 17 2011
  • Python
    from itertools import count, islice, product
    def lr(s): return s[::-1].translate({ord('2'):ord('5'), ord('5'):ord('2')})
    def A053701gen(): # generator of terms
        yield from [0, 1, 8]
        for d in count(2):
            for first in "1258":
                for rest in product("01258", repeat=d//2-1):
                    left = first + "".join(rest)
                    for mid in [[""], ["0", "1", "8"]][d%2]:
                        yield int(left + mid + lr(left))
    print(list(islice(A053701gen(), 45))) # Michael S. Branicky, Jul 09 2022

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), Oct 01 2001

A018847 Strobogrammatic primes: the same upside down (calculator-style numerals).

Original entry on oeis.org

2, 5, 11, 101, 151, 181, 619, 659, 6229, 10501, 12821, 15551, 16091, 18181, 19861, 60209, 60509, 61519, 61819, 62129, 116911, 119611, 160091, 169691, 191161, 196961, 605509, 620029, 625529, 626929, 650059, 655559, 656959, 682289, 686989, 688889
Offset: 1

Views

Author

Keywords

Comments

This is the subsequence of primes in A018846. - M. F. Hasler, May 05 2012

Crossrefs

Cf. A007597 (more restrictive version not allowing digits 2 or 5).

Programs

  • Mathematica
    lst = {}; fQ[n_] := Block[{allset = {0, 1, 2, 5, 6, 8, 9}, id = IntegerDigits@n}, Union@ Join[id, allset] == allset && Reverse[id /. {6 -> 9, 9 -> 6}] == id]; Do[ If[ PrimeQ@n && fQ@n, AppendTo[lst, n]], {n, 700000}]; lst (* Robert G. Wilson v, Feb 27 2007 *)
  • PARI
    {write("/tmp/b018847.txt","1 2\n2 5"); c=2; s2=[0,1,2,5,6,8,9]; s=[0,1,2,5,8]; s1=[0,1,2,5,9,8,6]; for(n=2,9, p1=vector( (n+1)\2, i, 10^(i-1)); p2=vector( (n+1)\2, i, 10^(n-i)); forvec( v=vector((n+1)\2,i,if( i>1, [ 1,if( i>n\2, #s, #s1)], [2,5])), v[1]==3 & v[1]=5; ispseudoprime( t=sum(i=1,n\2,p1[i]*s1[v[i]]+p2[i]*s2[v[i]] ) +if(n%2,p1[#p1]*s[v[#v]] )) & /* print1(t",") */ write("/tmp/b018847.txt",c++" "t)))} \\ - M. F. Hasler, Apr 26 2012
    
  • PARI
    is_A018847(n,t=Vec("012..59.86"))={ isprime(n) & apply(x->t[eval(x)+1], n=Vec(Str(n)))==vecextract(n, "-1..1") } \\ - M. F. Hasler, May 05 2012
    
  • Python
    from itertools import count, islice
    from sympy import isprime
    def A018847_gen(): # generator of terms
        r, t, u = ''.maketrans('69','96'), set('0125689'), {0,1,2,5,8}
        for x in count(1):
            for y in range(10**(x-1),10**x):
                if y%10 in u:
                    s = str(y)
                    if set(s) <= t and isprime(m:=int(s+s[-2::-1].translate(r))):
                        yield m
            for y in range(10**(x-1),10**x):
                s = str(y)
                if set(s) <= t and isprime(m:=int(s+s[::-1].translate(r))):
                    yield m
    A018847_list = list(islice(A018847_gen(),20)) # Chai Wah Wu, Apr 09 2024

A018849 Strobogrammatic squares: the same upside down (calculator-style numerals).

Original entry on oeis.org

0, 1, 121, 6889, 10201, 69169, 1002001, 5221225, 100020001, 109181601, 522808225, 602555209, 10000200001, 62188888129, 1000002000001, 1212225222121, 100000020000001, 10000000200000001, 10022212521222001, 12102202520220121
Offset: 1

Views

Author

Keywords

Comments

Subsequence of squares in A018846. - Michel Marcus, Aug 04 2014

Programs

  • PARI
    is_A018846(n, t=Vec("012..59.86"))={ apply(x->t[eval(x)+1], n=Vec(Str(n)))==vecextract(n, "-1..1"); }
    lista(nn) = {for(n=0, nn, if (is_A018846(n^2), print1(n^2, ", ")));} \\ Michel Marcus, Aug 04 2014

A115045 Strobogrammatic time display in hours and minutes on a 24-hour four spaced digital clock. Leading zeros omitted.

Original entry on oeis.org

0, 10, 20, 50, 101, 111, 121, 151, 202, 212, 222, 252, 505, 515, 525, 555, 609, 619, 629, 659, 808, 818, 858, 906, 916, 926, 956, 1001, 1111, 1221, 1551, 2002, 2112, 2222
Offset: 1

Views

Author

Lekraj Beedassy, Feb 28 2006

Keywords

Comments

050 and 2112 for instance stand for 0:50 and 21:12, i.e. 0h50mn and 21h12mn respectively.

Crossrefs

Cf. A018846.

A133030 Divisors of 5130.

Original entry on oeis.org

1, 2, 3, 5, 6, 9, 10, 15, 18, 19, 27, 30, 38, 45, 54, 57, 90, 95, 114, 135, 171, 190, 270, 285, 342, 513, 570, 855, 1026, 1710, 2565, 5130
Offset: 1

Views

Author

Omar E. Pol, Oct 27 2007

Keywords

Comments

5130 spells OEIS when turned upside down on a calculator: 57*90 = 5130 ---> OEIS.

Crossrefs

Programs

A321310 List of pairs of numbers with mirror symmetry (calculator-style numerals).

Original entry on oeis.org

0, 0, 1, 1, 2, 5, 5, 2, 8, 8, 11, 11, 12, 51, 15, 21, 18, 81, 21, 15, 22, 55, 25, 25, 28, 85, 51, 12, 52, 52, 55, 22, 58, 82, 81, 18, 82, 58, 85, 28, 88, 88, 101, 101, 102, 501, 105, 201, 108, 801, 111, 111, 112, 511, 115, 211, 118, 811, 121, 151, 122, 551
Offset: 0

Views

Author

Kritsada Moomuang, Nov 03 2018

Keywords

Comments

2 and 5 are taken as mirror images (as on calculator displays).

Examples

			The sequence begins:
   0,  0;
   1,  1;
   2,  5;
   5,  2;
   8,  8;
  11, 11;
  12, 51;
  15, 21;
  18, 81;
  21, 15;
  22, 55;
  25, 25;
  28, 85;
...
81 has its reflection as 18 in a mirror.
125 has its reflection as 251 in a mirror.
		

Crossrefs

Programs

  • Mathematica
    {0, 0}~Join~Array[If[Mod[#, 10] == 0, Nothing, If[IntegerLength[#1] == Length[#2], {#1, FromDigits@ #2}, Nothing] & @@ {#, Reverse@ IntegerDigits@ # /. {2 -> 5, 3 -> Nothing, 4 -> Nothing, 5 -> 2, 6 -> Nothing, 7 -> Nothing, 9 -> Nothing}}] &, 123] // Flatten (* Michael De Vlieger, Nov 05 2018 *)

A321702 Numbers that are still valid after a horizontal reflection on a calculator display.

Original entry on oeis.org

0, 1, 2, 3, 5, 8, 10, 11, 12, 13, 15, 18, 20, 21, 22, 23, 25, 28, 30, 31, 32, 33, 35, 38, 50, 51, 52, 53, 55, 58, 80, 81, 82, 83, 85, 88, 100, 101, 102, 103, 105, 108, 110, 111, 112, 113, 115, 118, 120, 121, 122, 123, 125, 128, 130, 131, 132, 133, 135, 138
Offset: 1

Views

Author

Kritsada Moomuang, Nov 17 2018

Keywords

Comments

Note that these numbers may not be unchanged after a horizontal reflection.
2 and 5 are taken as mirror images (as on calculator displays).
A007284 is a subsequence.
Also, numbers whose all digits are Fibonacci numbers. - Amiram Eldar, Feb 15 2024

Examples

			The sequence begins:
0, 1, 2, 3, 5, 8, 10, 11, 12, 13, ...;
0, 1, 5, 3, 2, 8, 10, 11, 15, 13, ...;
23 has its reflection as 53 in a horizontal mirror.
182 has its reflection as 185 in a horizontal mirror.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 140], Intersection[IntegerDigits[#], {4, 6, 7, 9}] == {} &] (* Amiram Eldar, Nov 17 2018 *)
  • PARI
    a(n, d=[0, 1, 2, 3, 5, 8]) = fromdigits(apply(k -> d[1+k], digits(n-1, #d))) \\ Rémy Sigrist, Nov 17 2018

Formula

Sum_{n>=2} 1/a(n) = 4.887249145579262560308470922947674796541485176473171687107616547235128170930... (calculated using Baillie and Schmelzer's kempnerSums.nb, see Links). - Amiram Eldar, Feb 15 2024
Showing 1-8 of 8 results.