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

A256708 Numbers n such that the decimal expansions of both n and n^2 have 0 as smallest digit and 8 as largest digit.

Original entry on oeis.org

280, 508, 780, 805, 1028, 1078, 1280, 1308, 1680, 1780, 1805, 1840, 2078, 2608, 2680, 2780, 2800, 2801, 2802, 2805, 2840, 2850, 3280, 3580, 3780, 3805, 3808, 3850, 4048, 4078, 4280, 4780, 4804, 4805, 4880, 5008, 5018, 5028, 5048, 5078, 5080, 5084, 5180, 5280
Offset: 1

Views

Author

Felix Fröhlich, Apr 08 2015

Keywords

Crossrefs

Programs

  • Mathematica
    fQ[n_] := Block[{c = DigitCount@ n}, And[c[[9]] == 0, c[[8]] > 0, c[[10]] > 0]]; Select[Range@ 5280, fQ@ # && fQ[#^2] &] (* Michael De Vlieger, Apr 12 2015 *)
    maxdQ[n_]:=Module[{id1=IntegerDigits[n],id2=IntegerDigits[n^2]},Max[ id1] == Max[ id2] == 8&&Min[id1]==Min[id2]==0]; Select[Range[6000],maxdQ] (* Harvey P. Dale, Oct 19 2021 *)
  • PARI
    is(n) = vecmin(digits(n))==0 && vecmin(digits(n^2))==0 && vecmax(digits(n))==8 && vecmax(digits(n^2))==8

A030097 Numbers k such that k^2 has only even digits.

Original entry on oeis.org

0, 2, 8, 20, 22, 68, 78, 80, 92, 162, 168, 200, 202, 220, 262, 298, 478, 492, 498, 668, 680, 780, 800, 898, 908, 920, 932, 1422, 1492, 1498, 1620, 1680, 1692, 2000, 2002, 2020, 2022, 2192, 2200, 2202, 2498, 2502, 2578, 2620, 2832, 2878, 2978, 2980, 4502
Offset: 1

Views

Author

Keywords

Comments

A136904 is a subsequence. - Zak Seidov, Dec 03 2012

Crossrefs

Programs

  • Mathematica
    Select[ Range[ 3000 ], Union[ EvenQ[ IntegerDigits[ #^2 ] ] ] == {True} & ]
  • PARI
    is_A030097(n)=!setminus(Set(Vec(Str(n^2))),Vec("02468"))  \\ M. F. Hasler, Dec 13 2011

Formula

a(n) = sqrt(A030098(n)). - Zak Seidov, Dec 03 2012

Extensions

More terms from Zak Seidov, May 24 2010

A385300 Integers k containing only odd digits, except the last digit, such that k^2 is composed of only even digits.

Original entry on oeis.org

2, 8, 78, 92, 932, 7798, 51192, 939398, 5157798, 7797578, 7797978, 9393978, 15119592, 15773398, 53179378, 53559332, 77979998, 79175932, 155139378, 157759592, 517751738, 535393932, 917933998, 939597798, 1511979592, 5157759592, 7771757978, 7775735378, 9393959798
Offset: 1

Views

Author

Gonzalo Martínez, Jun 24 2025

Keywords

Comments

Although the terms in this list contain only odd digits, except for the units digit, their squares have only even digits.
The terms of the list are even numbers ending only in 2 or in 8. Proof: if n ends in 0, 4 or 6, since the penultimate digit of n is odd, then the last 2 digits of n can be: 10, 14, 16, 30, 34, 36, 50, 54, 56, 70, 74, 76, 90, 94 and 96. If n ends in 10, 30, 50, 70 or 90, then the antepenultimate digit of n^2 is odd, while in the other cases the penultimate digit of n^2 is odd.
a(n) == 32, 38, 78, 92, 98 (mod 100), for n > 3.
a(n) == 192, 332, 338, 378, 398, 578, 592, 738, 798, 932, 978, 992, 998 (mod 1000), for n > 4. - Chai Wah Wu, Jun 25 2025

Examples

			7798 is a term, since only the last digit is even and 7798^2 = 60808804, whose digits are all even.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[10^7],NoneTrue[Take[IntegerDigits[#],IntegerLength[#]-1],EvenQ]&&AllTrue[IntegerDigits[#^2],EvenQ]&] (* James C. McMahon, Jun 28 2025 *)
  • PARI
    odd(n) = {my(k=1); while(n>5^k, n-=5^k; k++); fromdigits([2*d+1 | d<-digits(5^k+n-1, 5)]) - 3*10^k}; \\ A014261
    lista(nn) = my(list=List()); forstep (e=2, 8, 2, if (#select(x->(x%2), digits(e^2)) == 0, listput(list, e));); for (n=1, nn, my(o=odd(n)); forstep (e=0, 8, 2, my(oe = 10*o+e); if (#select(x->(x%2), digits(oe^2)) == 0, listput(list, oe)););); Vec(list); \\ Michel Marcus, Jun 25 2025
    
  • Python
    from itertools import count, product, islice
    def A385300_gen(): # generator of terms
        for l in count(1):
            for d in product('13579',repeat=l):
                m = int(''.join(d))-1
                if m>0 and set(str(m**2))<={'0','2','4','6','8'}:
                    yield m
    A385300_list = list(islice(A385300_gen(),29)) # Chai Wah Wu, Jun 25 2025

A085586 n, n^2 and n^3 all use only even digits.

Original entry on oeis.org

0, 2, 20, 200, 202, 2000, 2002, 2020, 20000, 20002, 20020, 20200, 200000, 200002, 200020, 200200, 202000, 2000000, 2000002, 2000020, 2000200, 2002000, 2020000, 20000000, 20000002, 20000020, 20000200, 20000202, 20002000, 20002002, 20020000
Offset: 1

Views

Author

Zak Seidov, Jul 06 2003

Keywords

Comments

Subsequence of A014263 and of A136904. - Michel Marcus, Oct 04 2013

Examples

			202 is a term because 202, 202^2=4008004 and 202^3=8024024008 all use only even digits.
		

Crossrefs

Cf. A068690.

Programs

  • PARI
    evdigs(n) = {if (n==0, return (1)); digs = digits(n); for (i = 1, #digs, if (digs[i] % 2, return (0));); return (1);}
    isok(n) = evdigs(n) && evdigs(n^2) && evdigs(n^3); \\ Michel Marcus, Oct 04 2013

Extensions

More terms from Michel Marcus and Jon E. Schoenfield, Oct 04 2013
Showing 1-4 of 4 results.