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

A132391 Numbers whose square starts with 4 identical digits.

Original entry on oeis.org

2357, 2582, 3334, 4714, 5774, 6667, 8165, 8819, 9428, 10541, 10542, 10543, 10544, 10545, 14907, 14908, 14909, 18257, 18258, 18259, 21081, 21082, 21083, 23570, 23571, 25819, 25820, 27888, 27889, 29813, 29814, 31622, 33332, 33333
Offset: 1

Views

Author

Jonathan Vos Post, Aug 29 2007

Keywords

Examples

			Example: 2357^2 = 5555449.
		

Crossrefs

Programs

  • Maple
    R:= NULL: count:= 0:
    for d from 1 while count < 100 do
      for i from 1 to 9 do
        L:= i*1111*10^d;
        X:= [$ceil(sqrt(L)) .. floor(sqrt(L+10^d-1))];
        m:= nops(X);
        if m > 0 then
          count:= count+nops(X);
          R:= R, op(X);
        fi
    od od:
    R; # Robert Israel, Mar 12 2021
  • Mathematica
    Select[Range[10, 50000], Length[Union[Take[IntegerDigits[ #^2], 4]]] == 1 & ]
    (* or *)
    (* Here's a more generic Mathematica program that calculates the first q terms of squares starting with n identical digits *)
    n=4; q=30; t=Table[(10^n-1)*i/9, {i,1,9}]; u=Sqrt[Union[t,10*t]];
    v=Sqrt[Union[t+1, 10*(t+1)]]; k=1; While[s=Sort[Flatten[Table[Union
    [Table[Range[Ceiling[10^j*u[[i]]], f=10^j*v[[i]]; If[IntegerQ[f],
    f=f-1]; Floor[f]], {i,1,18}]], {j,0,k}]]]; Length[s]Hans Havermann, Aug 30 2007 *)
  • Python
    def aupto(limit):
      alst = []
      for m in range(34, limit+1):
        if len(set(str(m*m)[:4])) == 1: alst.append(m)
      return alst
    print(aupto(33333)) # Michael S. Branicky, Mar 12 2021

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

A119866 Numbers whose square starts with 5 identical digits.

Original entry on oeis.org

10541, 33334, 47141, 57735, 66667, 105409, 105410, 105411, 105412, 105413, 149071, 149072, 149073, 182574, 182575, 182576, 210818, 210819, 235702, 235703, 258198, 258199, 278886, 278887, 298141, 298142, 316227, 333332, 333333, 333334
Offset: 1

Views

Author

Zak Seidov, Aug 04 2006

Keywords

Examples

			10541^2=111112681, 33334^2=1111155556.
		

Crossrefs

Programs

  • Mathematica
    Select[ Range[ 100, 500000 ], Length[ Union[ Take[ IntegerDigits[ #^2 ], 5 ] ] ] == 1 & ] (* Jonathan Vos Post, Aug 29 2007 *)

A131699 Smallest number whose n-th power begins with precisely n identical digits (in base ten).

Original entry on oeis.org

1, 15, 322, 167, 6444, 32183, 7306, 225418, 6551032, 683405939, 7074698775, 26331754107, 844494314469, 11303028458639, 251188643150958, 93364101391902, 16114920282762613, 239390020079624346, 191165654339590395
Offset: 1

Views

Author

Keywords

Comments

Main diagonal of array A[k,n] = n-th positive integer whose square (base 10) begins with k identical digits. M. F. Hasler points out that numbers whose squares start with 4 identical digits; numbers whose squares start with 5 identical digits; and numbers whose squares start with 6 identical digits; are already in the OEIS (along with A119511, A119998).
For the less stringent condition of the n-th power beginning with at least n identical digits, replace the numbers at indices {14,23,27,49,53} with:
14 1247955519394
23 2237770493401064693452
27 119060799886319434107761934
49 1389495494373137637129985217353011622113046714491
53 6489094571807720876517179893325894917102663447322282, respectively.

Examples

			a(1) = 1 because 1^1 = 1 begins with precisely 1 identical digit.
a(2) = 15 because 15^2 = 225 begins with precisely 2 identical digits.
a(3) = 322 because 322^3 = 33386248 begins with precisely 3 identical digits.
a(4) = 167 because 167^4 = 777796321 begins with precisely 4 identical digits.
a(5) = 6444 because 6444^5 = 11111627111310388224 begins with precisely 5 identical digits.
		

Crossrefs

See A132392 for another version.

Formula

a(n) = Min{k>0 such that k^n begins with precisely n identical leftmost digits (base ten)}.

Extensions

Edited by N. J. A. Sloane, Jul 01 2008 at the suggestion of R. J. Mathar

A346940 Numbers whose square starts with exactly 4 identical digits.

Original entry on oeis.org

2357, 2582, 3334, 4714, 5774, 6667, 8165, 8819, 9428, 10542, 10543, 10544, 10545, 14907, 14908, 14909, 18257, 18258, 18259, 21081, 21082, 21083, 23570, 23571, 25819, 25820, 27888, 27889, 29813, 29814, 31622, 33332, 33333, 33335, 33336, 33337, 33338, 33339, 33340, 33341, 33342
Offset: 1

Views

Author

Bernard Schott, Aug 08 2021

Keywords

Comments

If m is a term, 10*m is another term.
Differs from A132391 where only at least 4 identical digits are required; indeed, 10541 is the first term of A132391 that is not in this sequence (see Example section), the next one is 33346.

Examples

			2357 is a term because 2357^2 = 5555449 starts with four 5's.
10541 is not a term because 10541^2 = 111112681 starts with five 1's.
		

Crossrefs

Supersequences: A131573, A132391.
Similar with: A346812 (2 digits), A346891 (3 digits).

Programs

  • Mathematica
    q[n_] := SameQ @@ (d = IntegerDigits[n^2])[[1 ;; 4]] && d[[5]] != d[[1]]; Select[Range[100, 33350], 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]
    print(list(filter(ok, range(33343)))) # Michael S. Branicky, Aug 08 2021

A167712 a(n) = the smallest positive number, not ending in 0, whose square has a substring of exactly n identical digits.

Original entry on oeis.org

1, 12, 38, 1291, 10541, 57735, 364585, 1197219, 50820359, 169640142, 298142397, 4472135955, 1490711985, 2185812841434
Offset: 1

Views

Author

Zak Seidov, Nov 10 2009

Keywords

Examples

			a(1)=1: 1^2=1 (1 one), a(1)=A119511(1)=A119998(1)
a(2)=12: 12^2=144 (2 fours)
a(3)=38: 38^2=1444 (3 fours)
a(4)=1291: 1291^2=1666681 (4 sixes)
a(5)=10541: 10541^2=111112681 (5 ones), a(5)=A119511(5)=A119998(5)
a(6)=57735: 57735^2=3333330225 (6 threes), a(6)=A119511(6)=A119998(6)
a(7)=364585: 364585^2=132922222225 (7 twos)
a(8)=1197219: 1197219^2=1433333333961 (8 threes)
a(9)=50820359: 50820359^2=2582708888888881 (9 eights)
a(10)=169640142: 169640142^2=28777777777780164 (10 sevens)
a(11)=298142397: 298142397^2=88888888888905609 (11 eights), a(11)=A119511(11)=A119998(11)
a(12)=4472135955: 4472135955^2=20000000000003762025 (12 zeros)
a(13)=1490711985: 1490711985^2=2222222222222640225 (13 twos), a(13)=A119511(13)=A119998(12,13).
		

Crossrefs

Programs

  • Mathematica
    a[n_] := Block[{k=1}, While[Mod[k, 10] == 0 || !MemberQ[Length /@ Split[ IntegerDigits[ k^2]], n], k++]; k]; Array[a, 7] (* Giovanni Resta, Apr 11 2017 *)

Extensions

a(14) from Giovanni Resta, Apr 11 2017
Showing 1-6 of 6 results.