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

A067251 Numbers with no trailing zeros in decimal representation.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 102, 103, 104
Offset: 1

Views

Author

Reinhard Zumkeller, Mar 10 2002

Keywords

Comments

Or, decimated numbers: every 10th number has been omitted from the natural numbers. - Cino Hilliard, Feb 21 2005. For example, The 10th number starting with 1 is 10 and is missing from the table because it was decimated.
The word "decimated" can be interpreted in several ways and should be used with caution. - N. J. A. Sloane, Feb 21 2005
Not the same as A052382, as 101 is included.
Numbers in here but not in A043095 are 81, 91, 92, 93, 94,... for example. - R. J. Mathar, Sep 30 2008
The integers 100*a(n) are precisely the numbers whose square ends with exactly 4 identical digits while the integers 10*a(n) form just a subsequence of the numbers whose square ends with exactly 2 identical digits (A346678). - Bernard Schott, Oct 04 2021

Crossrefs

Complement of A008592.
Cf. A076641 (reversed).
Cf. A039685 (a subsequence), A346678, A346940, A346942.

Programs

  • Haskell
    a067251 n = a067251_list !! (n-1)
    a067251_list = filter ((> 0) . flip mod 10) [0..]
    -- Reinhard Zumkeller, Jul 11 2015, Dec 29 2011
    
  • Maple
    S := seq(n + floor((n-1)/9), n=1..100); # Bernard Schott, Oct 04 2021
  • Mathematica
    DeleteCases[Range[110],?(Divisible[#,10]&)] (* _Harvey P. Dale, May 16 2016 *)
  • PARI
    f(n) = for(x=1,n,if(x%10,print1(x","))) \\ Cino Hilliard, Feb 21 2005
    
  • PARI
    Vec(x*(x+1)*(x^4-x^3+x^2-x+1)*(x^4+x^3+x^2+x+1)/((x-1)^2*(x^2+x+1)*(x^6+x^3+1)) + O(x^100)) \\ Colin Barker, Sep 28 2015
    
  • Python
    def a(n): return n + (n-1)//9
    print([a(n) for n in range(1, 95)]) # Michael S. Branicky, Oct 04 2021

Formula

a(n) = n + floor((n-1)/9).
a(n) mod 10 > 0 for all n.
A004086(A004086(a(n))) = a(n).
A168184(a(n)) = 1. - Reinhard Zumkeller, Nov 30 2009
From Colin Barker, Sep 28 2015: (Start)
a(n) = a(n-1) + a(n-9) - a(n-10) for n>10.
G.f.: x*(x+1)*(x^4-x^3+x^2-x+1)*(x^4+x^3+x^2+x+1) / ((x-1)^2*(x^2+x+1)*(x^6+x^3+1)). (End)
Sum_{n>=1} (-1)^(n+1)/a(n) = (1/20 + 1/sqrt(5) - sqrt(1+2/sqrt(5))/5) * Pi. - Amiram Eldar, May 11 2025

Extensions

Edited by N. J. A. Sloane, Sep 06 2008 at the suggestion of R. J. Mathar
Typos corrected in a comment line by Reinhard Zumkeller, Apr 04 2010

A186439 Numbers whose squares end in three identical digits.

Original entry on oeis.org

38, 100, 200, 300, 400, 462, 500, 538, 600, 700, 800, 900, 962, 1000, 1038, 1100, 1200, 1300, 1400, 1462, 1500, 1538, 1600, 1700, 1800, 1900, 1962, 2000, 2038, 2100, 2200, 2300, 2400, 2462, 2500, 2538, 2600, 2700, 2800, 2900, 2962, 3000, 3038, 3100, 3200, 3300, 3400, 3462
Offset: 1

Views

Author

Michel Lagneau, Feb 21 2011

Keywords

Comments

The three ending digits of a(n)^2 are 000 or 444.
n is in the sequence iff either n == 0 mod 100 or n == (+/-)38 mod 500. - Robert Israel, Jul 03 2014

Examples

			462 is in the sequence because 462^2 = 213444.
		

Crossrefs

Cf. A016742 (even squares), A186438.
Cf. A346678.

Programs

  • Maple
    with(numtheory):T:=array(1..10):for p from 1 to 10000 do:n:=p^2:l:=length(n):n0:=n:for
      m from 1 to l do:q:=n0:u:=irem(q,10):v:=iquo(q,10):n0:=v :T[m]:=u:od:if T[1]=T[2]
      and T[1]=T[3] then printf(`%d, `,p):else fi:od:
    # second Maple program:
    a:= proc(n) local m, r;
          r:= 1+ irem(n-1, 7, 'm');
          [38, 100, 200, 300, 400, 462, 500][r] +500*m
        end:
    seq(a(n), n=1..100);  # Alois P. Heinz, Feb 24 2011
  • Mathematica
    Select[Range[11,10000],Mod[PowerMod[#,2,1000],111]==0&] (* Zak Seidov, Feb 23 2011 *)
  • PARI
    for(n=11,10000,if((n^2%1000)%111==0,print1(n", "))) \\ Zak Seidov, Feb 23 2011
    
  • PARI
    Vec(2*x*(19*x^2 +12*x +19)*(x^4 +x^3 +x^2 +x +1)/((x -1)^2*(x^6 +x^5 +x^4 +x^3 +x^2 +x +1)) + O(x^100)) \\ Colin Barker, Jul 03 2014
    
  • Python
    def ok(n): s = str(n*n); return len(s) > 2 and s[-1] == s[-2] == s[-3]
    print(list(filter(ok, range(3463)))) # Michael S. Branicky, Jul 29 2021

Formula

a(A047336(n)) = A039685(n). - Bruno Berselli, Feb 22 2011
a(n) = a(n-7) + 500 for n > 7. - Zak Seidov and Bruno Berselli, Feb 23 2011
G.f.: 2*x*(19*x^2 +12*x +19)*(x^4 +x^3 +x^2 +x +1) / ((x -1)^2*(x^6 +x^5 +x^4 +x^3 +x^2 +x +1)). - Colin Barker, Jul 03 2014

A346892 Numbers whose square starts and ends with exactly 3 identical digits.

Original entry on oeis.org

10538, 33462, 99962, 105462, 105538, 149038, 182538, 298038, 333538, 333962, 334038, 334462, 334538, 471538, 471962, 472038, 577462, 577538, 666462, 666538, 666962, 667038, 745038, 745462, 745538, 816538, 881538, 881962, 882038, 942462, 942538, 999538, 1053962, 1054038, 1054538, 1054962
Offset: 1

Views

Author

Bernard Schott, Aug 06 2021

Keywords

Comments

The terminal digits of the square of terms are necessarily 444.
The last 3 digits of terms are either 038, 462, 538 or 962. - Chai Wah Wu, Oct 02 2021

Examples

			10538 is a term because 10538^2 = 111049444
666462 = A348832(1) is a term because 666462^2 = 444171597444, the smallest square that starts with exactly three 4's and ends also with three 4's.
105462 is a term because 105462^2 = 11122233444 (see A079035).
74538 is not a term because 74538^2 = 5555913444 with four starting 5's.
		

Crossrefs

Intersection of A039685 and A346891.
Cf. A346774 (similar, with 2 identical digits).
A348832 is a subsequence.

Programs

  • Mathematica
    Select[Range[10^3, 10^6], (d = IntegerDigits[#^2])[[1]] == d[[2]] == d[[3]] != d[[4]] && d[[-1]] == d[[-2]] == d[[-3]] != d[[-4]] &] (* Amiram Eldar, Aug 06 2021 *)
  • Python
    def ok(n):
        s = str(n*n)
        if len(s) < 4: return False
        return s[0] == s[1] == s[2] != s[3] and s[-1] == s[-2] == s[-3] != s[-4]
    print(list(filter(ok, range(10**6)))) # Michael S. Branicky, Aug 06 2021
    
  • Python
    A346892_list = [1000*n+d for n in range(10**6) for d in [38,462,538,962] if (lambda x:x[0]==x[1]==x[2]!=x[3])(str((1000*n+d)**2))] # Chai Wah Wu, Oct 02 2021

A328886 Squares that end in 444.

Original entry on oeis.org

1444, 213444, 289444, 925444, 1077444, 2137444, 2365444, 3849444, 4153444, 6061444, 6441444, 8773444, 9229444, 11985444, 12517444, 15697444, 16305444, 19909444, 20593444, 24621444, 25381444, 29833444, 30669444, 35545444, 36457444, 41757444, 42745444, 48469444
Offset: 1

Views

Author

Felix Fröhlich, Oct 29 2019

Keywords

Comments

See A039685 for further information about these numbers.

Crossrefs

Cf. A039685.

Programs

  • Mathematica
    Select[Table[n*10^3+444,{n,50000}],IntegerQ[Sqrt[#]]&] (* Harvey P. Dale, Jun 19 2020 *)
    Flatten[Table[500n+{38,-38},{n,0,20}]]^2//Union (* Harvey P. Dale, Jan 26 2025 *)
  • PARI
    a039685(n) = 250*n+87*(-1)^n-125
    a(n) = a039685(n)^2

Formula

a(n) = A039685(n)^2.

A346891 Positive numbers whose square starts with exactly 3 identical digits.

Original entry on oeis.org

149, 298, 334, 472, 667, 745, 882, 1054, 1055, 1056, 1057, 1058, 1490, 1491, 1492, 1493, 1825, 1826, 1827, 2108, 2109, 2356, 2581, 2788, 2789, 2980, 2981, 3161, 3162, 3332, 3333, 3335, 3336, 3337, 3338, 3339, 3340, 3341, 3342, 3343, 3344, 3345, 3346
Offset: 1

Views

Author

Bernard Schott, Aug 06 2021

Keywords

Comments

If m is a term 10*m is another term.
2357 is the first term of A131573 that is not in this sequence (see Example section), the next ones are 2582, 3334, ...

Examples

			149 is a term because 149^2 = 22201 starts with three 2's.
2357 is not a term because 2357^2 = 5555449 starts with four 5's.
		

Crossrefs

Subsequence of A131573.
Cf. A039685 (similar, with "ends"), A346812 (similar, with 2), A346892.

Programs

  • Mathematica
    Select[Range[32, 3350], (d = IntegerDigits[#^2])[[1]] == d[[2]] == d[[3]] != d[[4]] &] (* Amiram Eldar, Aug 06 2021 *)
  • Python
    def ok(n): s = str(n*n); return len(s) > 3 and s[0] == s[1] == s[2] != s[3]
    print(list(filter(ok, range(3347)))) # Michael S. Branicky, Aug 06 2021

A346942 Numbers whose square starts and ends with exactly 4 identical digits.

Original entry on oeis.org

235700, 258200, 333400, 471400, 577400, 666700, 816500, 881900, 942800, 1054200, 1054300, 1054400, 1054500, 1490700, 1490800, 1490900, 1825700, 1825800, 1825900, 2108100, 2108200, 2108300, 2357100, 2581900, 2788800, 2788900, 2981300, 2981400, 3162200, 3333200, 3333300
Offset: 1

Views

Author

Bernard Schott, Aug 08 2021

Keywords

Comments

Terms are equal to 100 times the primitive terms of A346940, those that have no trailing zero in decimal representation, hence all terms end with exactly 00.

Examples

			258200 is a term because 258200^2 = 66667240000 starts with four 6's and ends with four 0's.
3334700 is not a term because 3334700^2 = 1111155560000 starts with five 1's (and ends with four 0's).
		

Crossrefs

Numbers whose square '....' with exactly k identical digits:
---------------------------------------------------------------------------
| k \'....'| starts | ends | starts and ends |
---------------------------------------------------------------------------
| k = 2 | A346812 | A346678 | A346774 |
| k = 3 | A346891 | A039685 | A346892 |
| k = 4 | A346940 | 100*A067251 | this sequence |
---------------------------------------------------------------------------
Cf. A346926.

Programs

  • Mathematica
    q[n_] := SameQ @@ (d = IntegerDigits[n^2])[[1 ;; 4]] && d[[5]] != d[[1]] && SameQ @@ d[[-4 ;; -1]] && d[[-5]] != d[[-1]]; Select[Range[10000, 3333300], q] (* Amiram Eldar, Aug 08 2021 *)
  • Python
    def ok(n):
      s = str(n*n)
      return len(s) > 4 and s[0] == s[1] == s[2] == s[3] != s[4] and s[-1] == s[-2] == s[-3] == s[-4] != s[-5]
    print(list(filter(ok, range(3333333)))) # Michael S. Branicky, Aug 08 2021
    
  • Python
    A346942_list = [100*n for n in range(99,10**6) if n % 10 and (lambda x:x[0]==x[1]==x[2]==x[3]!=x[4])(str(n**2))] # Chai Wah Wu, Oct 02 2021

A352992 Smallest positive integer whose cube ends with exactly n 7's.

Original entry on oeis.org

1, 3, 53, 1753, 753, 60753, 660753, 9660753, 99660753, 899660753, 3899660753, 33899660753, 233899660753, 7233899660753, 97233899660753, 497233899660753, 1497233899660753, 31497233899660753, 631497233899660753, 9631497233899660753, 59631497233899660753, 559631497233899660753
Offset: 0

Views

Author

Bernard Schott, Apr 14 2022

Keywords

Comments

When A225401(k) = 0, i.e. k is a term of A353003, then a(k) > a(k+1); 1st example is for k = 3 with a(3) = 1753 > a(4) = 753; otherwise, a(n) < a(n+1).
When n <> k, a(n) coincides with the 'backward concatenation' of A225401(n-1) up to A225401(0), where A225401 is the 10-adic integer x such that x^3 = -7/9 (see table in Example section); when n= k, a(k) must be calculated directly with the definition.
Without "exactly" in the name, terms a'(n) should be: 1, 3, 53, 753, 753, 60753, 660753, ...
There are similar sequences when cubes end with 1, 3, 8 or 9; but there's no similar sequence for squares, because when a square ends in more than three identical digits, these digits are necessarily 0.

Examples

			a(1) = 3 because 3^3 = 27;
a(2) = 53 because 53^2 = 148877;
a(3) = 1753 because 1753^3 = 5386984777;
a(4) = 753 because 753^2 = 426957777;
a(5) = 60753 because 60753^3 = 224234888577777.
Table with a(n) and A225401(n-1)
   ---------------------------------------------------------------------------
   |    |     a(n)       |      a'(n)        | A225401(n-1) |  concatenation |
   | n  | with "exactly" | without "exactly" |  = b(n-1)    |  b(n-1)...b(0) |
   ---------------------------------------------------------------------------
     0           1                 1
     1           3                 3               3                  ...3
     2          53                53               5                 ...53
     3        1753               753               7                ...753
     4         753               753               0               ...0753
     5       60753             60753               6              ...60753
     6      660753            660753               6             ...660753
     7     9660753           9660753               9            ...9660753
  ..........................................................................
Also, as A225401(23) = 0, we have from a(21) up to a(25):
a(21) =     559631497233899660753;
a(22) =    3559631497233899660753;
a(23) =  193559631497233899660753, found by _Marius A. Burtea_;
a(24) =   93559631497233899660753;
a(25) = 2093559631497233899660753.
		

Crossrefs

Programs

  • Maple
    f:= proc(n) local t,x;
           t:= 7/9*(10^n-1);
           x:= rhs(op(msolve(x^3=t,10^n)));
           while x^3 mod 10^(n+1) = 10*t+7 do x:= x + 10^n od;
           x
    end proc:
    f(0):= 1:
    map(f, [$0..30]); # Robert Israel, Jul 29 2025
  • Python
    def a(n):
        k, s, target = 1, "1", "7"*n
        while s.rstrip("7") + target != s: k += 1; s = str(k**3)
        return k
    print([a(n) for n in range(8)]) # Michael S. Branicky, Apr 14 2022

Formula

When n is not in A353003, a(n) = Sum_{k=0..n-1} A225401(k) * 10^k.

Extensions

a(8)-a(9) from Marius A. Burtea, Apr 14 2022

A346926 a(n) is the smallest positive integer whose square starts and ends with exactly n identical digits, and a(n) = 0 when there is no such integer.

Original entry on oeis.org

1, 88, 10538, 235700, 0, 57735000, 0, 14907120000, 0, 235702260400000, 0, 7453559925000000, 0, 105409255338950000000, 0, 10540925533894600000000, 0, 14907119849998598000000000, 0, 74535599249992989880000000000, 0, 210818510677891955466600000000000, 0
Offset: 1

Views

Author

Bernard Schott, Aug 07 2021

Keywords

Comments

When a square ends in exactly three identical digits, these digits are necessarily 444 (A039685).
When a square ends with n > 3 identical digits, these last digits are necessarily 0's, and also this is only possible when n is even.
Differs from A174499 where only at least n identical digits are required.

Examples

			a(2) = 88 because 88^2 = 7744 starts with two 7's and ends with two 4's, and 88 is the smallest integer whose square starts and ends with exactly 2 identical digits.
a(4) = 235700 because 235700^2 = 55554490000 starts with four 5's and ends with four 0's, and 235700 is the smallest integer whose square starts and ends with exactly 4 identical digits.
		

Crossrefs

Formula

a(2*n+1) = 0 for n >= 2.
a(2*n) = A119511(2*n) * 10^n, for n >= 2.

A348832 Positive numbers whose square starts and ends with exactly 444.

Original entry on oeis.org

666462, 666538, 666962, 667038, 2107462, 2107538, 2107962, 2108038, 2108462, 2108538, 2108962, 2109038, 2109462, 6663462, 6663538, 6663962, 6664038, 6664462, 6664538, 6664962, 6665038, 6665462, 6665538, 6665962, 6666038, 6667462, 6667538, 6667962, 6668038, 6668462, 6668538, 6668962
Offset: 1

Views

Author

Bernard Schott, Nov 09 2021

Keywords

Comments

The 1st problem of British Mathematical Olympiad (BMO) in 1995 (see link) asked to find all positive integers whose squares end in three 4’s (A039685); this sequence is the subsequence of these integers whose squares also start in precisely three 4's (no four or more 4's). Two such infinite subsequences are proposed below.
When a square starts and ends with digits ddd, then ddd is necessarily 444.
The first 3 digits of terms are either 210, 666 or 667, while the last 3 digits are either 038, 462, 538 or 962 (see examples).
From Marius A. Burtea, Nov 09 2021 : (Start)
The sequence is infinite because the numbers 667038, 6670038, 66700038, 667000038, ..., 667*10^k + 38, k >= 3, are terms because are square 444939693444, 44489406921444, 4448895069201444, 444889050692001444, 44488900506920001444, ...
Also, 6663462, 66633462, 666333462, 6663333462, ..., (1999*10^k + 386) / 3, k >= 4, are terms and have no digits 0, because their squares are 44401725825444, 4440018258105444, 444000282580905444, 44400012825808905444,
4440001128258088905444, ... (End)

Examples

			666462 is a term since 666462^2 = 444171597444.
21038 is not a term since 21038^2 = 442597444.
		

References

  • A. Gardiner, The Mathematical Olympiad Handbook: An Introduction to Problem Solving, Oxford University Press, 1997, reprinted 2011, Pb 1 pp. 55 and 95-96 (1995)

Crossrefs

Subsequence of A039685, A045858, A273375, A305719, A346892.
Similar to: A348488 (d=4), A348831 (dd=44), this sequence (ddd=444).

Programs

  • Magma
    fd:=func; fs:=func; [n:n in [1..6700000]|fd(n) and fs(n)]; // Marius A. Burtea, Nov 09 2021
  • Mathematica
    Select[Range[100, 7*10^6], (d = IntegerDigits[#^2])[[1 ;; 3]] == d[[-3 ;; -1]] == {4, 4, 4} && d[[-4]] != 4 && d[[4]] != 4 &] (* Amiram Eldar, Nov 09 2021 *)
  • Python
    from itertools import count, takewhile
    def ok(n):
      s = str(n*n); return len(s.rstrip("4")) == len(s.lstrip("4")) == len(s)-3
    def aupto(N):
      ends = [38, 462, 538, 962]
      r = takewhile(lambda x: x<=N, (1000*i+d for i in count(0) for d in ends))
      return [k for k in r if ok(k)]
    print(aupto(6668962)) # Michael S. Branicky, Nov 09 2021
    
Showing 1-9 of 9 results.