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.

Previous Showing 11-20 of 36 results. Next

A061910 Positive numbers k such that sum of digits of k^2 is a square.

Original entry on oeis.org

1, 2, 3, 6, 9, 10, 11, 12, 13, 14, 15, 18, 20, 21, 22, 23, 30, 31, 39, 41, 45, 48, 51, 58, 59, 60, 67, 68, 76, 77, 85, 86, 90, 94, 95, 100, 101, 102, 103, 104, 105, 110, 111, 112, 113, 120, 121, 122, 130, 131, 139, 140, 148, 150, 157, 158, 166, 175, 176, 180, 184, 185
Offset: 1

Views

Author

Asher Auel, May 17 2001

Keywords

Examples

			6^2 = 36 and 3+6 = 9 is a square. 13^2 = 169 and 1+6+9 = 16 is a square.
		

Crossrefs

Sequence A293832 gives the start of the first run of n consecutive values.

Programs

  • Magma
    [ n: n in [1..185] | IsSquare(&+Intseq(n^2)) ];  // Bruno Berselli, Jul 29 2011
    
  • Maple
    readlib(issqr): f := []: for n from 1 to 200 do if issqr(convert(convert(n^2,base,10),`+`)) then f := [op(f), n] fi; od; f;
  • Mathematica
    Select[Range[185], IntegerQ[Sqrt[Total[IntegerDigits[#^2]]]] &] (* Jayanta Basu, May 06 2013 *)
  • PARI
    is(n)=n=eval(Vec(Str(n^2)));issquare(sum(i=1,#n,n[i])) \\ Charles R Greathouse IV, Jul 29 2011
    
  • PARI
    select( is_A061910(n)=issquare(sumdigits(n^2)), [0..199]) \\ Includes the initial 0. - M. F. Hasler, Oct 16 2017
    
  • Python
    from gmpy2 import is_square
    A061910 = [n for n in range(1,10**3) if is_square(sum(int(d) for d in str(n*n)))] # Chai Wah Wu, Sep 03 2014

A169940 Consider the 2^(n-1) monic polynomials f(x) with coefficients 0 or 1, degree n and f(0)=1. Sequence gives triangle read by rows, in which T(n,k) (n>=1) is the number of such polynomials of thickness k (2 <= k <= n+1).

Original entry on oeis.org

1, 1, 1, 3, 0, 1, 3, 3, 1, 1, 5, 4, 6, 0, 1, 7, 7, 10, 6, 1, 1, 13, 8, 27, 6, 9, 0, 1, 15, 21, 41, 23, 17, 9, 1, 1, 27, 20, 98, 34, 56, 8, 12, 0, 1, 25, 53, 148, 96, 104, 50, 22, 12, 1, 1, 45, 56, 325, 116, 294, 66, 96, 10, 15, 0, 1, 59, 89, 487, 319, 518, 262, 184, 86
Offset: 1

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

Comments

The thickness of a polynomial f(x) is the magnitude of the largest coefficient in the expansion of f(x)^2.

Examples

			Triangle begins:
[1]
[1, 1]
[3, 0, 1]
[3, 3, 1, 1]
[5, 4, 6, 0, 1]
[7, 7, 10, 6, 1, 1]
[13, 8, 27, 6, 9, 0, 1]
[15, 21, 41, 23, 17, 9, 1, 1]
[27, 20, 98, 34, 56, 8, 12, 0, 1]
[25, 53, 148, 96, 104, 50, 22, 12, 1, 1]
[45, 56, 325, 116, 294, 66, 96, 10, 15, 0, 1]
[59, 89, 487, 319, 518, 262, 184, 86, 27, 15, 1, 1]
[89, 112, 942, 434, 1279, 346, 608, 112, 143, 12, 18, 0, 1]
[103, 197, 1348, 1042, 2181, 1153, 1166, 528, 291, 131, 32, 18, 1, 1]
[163, 220, 2613, 1320, 4981, 1568, 3313, 720, 1083, 168, 199, 14, 21, 0, 1]
...
For n=3 there are four polynomials x^3+1, x^3+x+1, x^3+x^2+1, x^3+x^2+x+1. Their squares are x^6+2*x^3+1, x^6+2*x^4+2*x^3+x^2+2*x+1, x^6+2*x^5+2*x^3+x^4+2*x^2+1 and x^6+2*x^5+3*x^4+4*x^3+3*x^2+2*x+1. Their thicknesses are 2,2,2,4. So T(3,2)=3, T(3,3)=0, T(3,4)=1.
The next 15 rows of the triangle are:
[187, 397, 3693, 2849, 8393, 4499, 6123, 2873, 2157, 939, 413, 185, 37, 21, 1, 1]
[281, 456, 6672, 3854, 17730, 6404, 15634, 4056, 6864, 1316, 1730, 234, 264, 16, 24, 0, 1]
[313, 711, 9458, 7940, 28938, 16432, 28534, 13398, 13488, 5906, 3568, 1514, 556, 248, 42, 24, 1, 1]
[469, 850, 16483, 10670, 58520, 23610, 67290, 19842, 37934, 8502, 12540, 2158, 2582, 310, 338, 18, 27, 0, 1]
[533, 1347, 22903, 20511, 94574, 55510, 120550, 57880, 73288, 32006, 25552, 10754, 5484, 2284, 716, 320, 47, 27, 1, 1]
[835, 1428, 39252, 27560, 183225, 80676, 267894, 86894, 189156, 48572, 78530, 15786, 20948, 3292, 3660, 396, 421, 20, 30, 0, 1]
[873, 2303, 53874, 51088, 290401, 179485, 469928, 232610, 359532, 158100, 158248, 66158, 43924, 18026, 7948, 3274, 895, 401, 52, 30, 1, 1]
[1319, 2642, 89947, 68614, 545421, 260616, 998433, 353278, 868696, 244418, 442240, 101860, 146260, 26948, 32804, 4750, 4997, 492, 513, 22, 33, 0, 1]
[1551, 3777, 123653, 121487, 853975, 549189, 1725367, 876575, 1621096, 725016, 877388, 365898, 304048, 123536, 70436, 28400, 11029, 4511, 1093, 491, 57, 33, 1, 1]
[2093, 4636, 200706, 164644, 1558400, 798552, 3526978, 1340828, 3719207, 1137278, 2280612, 580200, 912118, 192574, 251928, 43126, 48875, 6572, 6616, 598, 614, 24, 36, 0, 1]
[2347, 6693, 271092, 285484, 2403986, 1616482, 5997220, 3147524, 6830683, 3108825, 4457858, 1874174, 1873798, 754630, 537286, 213744, 107163, 42619, 14802, 6022, 1310, 590, 62, 36, 1, 1]
[3477, 7550, 438403, 379800, 4292926, 2346592, 11882630, 4821002, 15021379, 4920018, 10948081, 3008372, 5200638, 1217690, 1719966, 336912, 408989, 65534, 70061, 8794, 8546, 714, 724, 26, 39, 0, 1]
[3881, 11109, 585071, 644971, 6538688, 4594134, 19912060, 10801102, 27155069, 12640031, 21054795, 8950909, 10529720, 4248966, 3632012, 1428638, 890393, 348839, 156301, 61531, 19322, 7834, 1546, 698, 67, 39, 1, 1]
[5363, 12876, 927332, 860898, 11437031, 6656592, 38401950, 16551444, 57664535, 20086508, 49373458, 14542512, 27487209, 6959998, 10699424, 2334678, 3027695, 555714, 633348, 95568, 97301, 11454, 10814, 840, 843, 28, 42, 0, 1]
[5871, 17965, 1239392, 1419768, 17273147, 12579603, 63611068, 35500374, 102865259, 48877549, 93622166, 40321020, 54860417, 22275601, 22298854, 8743268, 6540369, 2528691, 1403386, 543422, 220305, 86061, 24650, 9974, 1801, 815, 72, 42, 1, 1]
		

Crossrefs

Related to thickness: A169940-A169954, A061909.

Programs

  • Mathematica
    row[n_] := Module[{dd, xx, mm}, dd = Join[{1}, PadLeft[IntegerDigits[#, 2], n-1], {1}]& /@ Range[0, 2^(n-1) - 1]; xx = (((x^Range[n, 0, -1]).#)& /@ dd)^2 // Expand; mm = Max[CoefficientList[#, x]]& /@ xx; Table[Count[mm, k], {k, 2, n+1}]]; Table[row[n], {n, 1, 12}] // Flatten (* Jean-François Alcover, Oct 10 2017 *)
  • PARI
    T(n)={ my(c=vector(n)); forstep(j=1<M. F. Hasler, Nov 12 2010

Formula

Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?
From M. F. Hasler, Nov 12 2010: (Start)
T(n,n+1) = 1 = T(2m,2m), T(2m+1,2m+1) = 0,
T(n+1,n) = (3, 3, 6, 6, 9, 9, ...) = 3*[n/2-1] = A168237(n) (n>2),
T(2m+2,2m) = (3, 10, 17, 22, 27, 32, 37, ...) = 5m+2 for m>2,
T(2m+3,2m+1) = (4, 6, 8, 10, ...) = 2m+2 for m>0,
T(2m+3,2m) = (5, 27, 56, 96, 143, 199, 264, ...) = m(9m+13)/2-2 for m>3,
T(2m+4,2m+1) = (7, 23, 50, 86, 131, 185, 248, ...) = 9m(m+1)/2-4 for m>1,
... (End)

Extensions

Rows 16-30 from Nathaniel Johnston, Nov 12 2010

A169954 Maximal entry in row n of triangle in A169950.

Original entry on oeis.org

1, 1, 2, 5, 8, 13, 20, 45, 86, 184, 332, 657, 1144, 2279, 4460, 9441, 17834, 35564, 64502, 123022, 243534, 511428, 981356, 1979789, 3705156, 7232134, 13723662, 28745041, 55900110, 113564645
Offset: 0

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

Crossrefs

Related to thickness: A169940-A169954, A061909.

Formula

Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?

Extensions

A-number typo in definition corrected - R. J. Mathar, Sep 28 2010
a(16)-a(29) from Nathaniel Johnston, Nov 15 2010

A061912 a(n) is the smallest m for which sqrt(sum of digits of m^2) = n.

Original entry on oeis.org

0, 1, 2, 3, 13, 67, 264, 1667, 16667, 94863, 1643167, 29983327, 706399164, 31144643167, 1296109172867, 62441868958167, 6927459779738887, 447213595487659543, 77453069648658793167, 14104963594032775808167, 3146266035952345970972687
Offset: 0

Views

Author

Asher Auel, May 17 2001

Keywords

Comments

a(15) <= 62441868958167. - Donovan Johnson, Jul 10 2012
a(21) <= 29999999949999914454883190583. a(22) <= 948566760423324122079007168333. - Zhining Yang, Jun 21 2024

Examples

			Sum of digits of 13^2 = sum of digits of 169 = 16 is the first occurrence of 4^2, so a(4) = 13.
		

Crossrefs

Programs

  • Maple
    f := []: a := 1: for i from 1 to 10 do for j from 1 do if sqrt(convert(convert(j^2,base,10),`+`)) = i then f := [op(f),j]; a := j; break fi; od; od; f;
  • Mathematica
    t={}; m=0; Do[While[Sqrt[Total[IntegerDigits[m^2]]] != n, m++]; AppendTo[t, m], {n,0,9}]; t (* Jayanta Basu, May 06 2013 *)
  • PARI
    a(n) = my(k=0); while(sumdigits(k^2) != n^2, k++); k; \\ Michel Marcus, Jan 07 2017

Extensions

a(11) from John W. Layman, Jan 10 2002
a(12) from Ryan Propper, Jul 07 2005
a(13) from Zak Seidov, Jan 27 2011
a(14) from Donovan Johnson, Jul 10 2012
a(15)-a(20) from Zhining Yang, Jun 21 2024

A085305 Numbers such that first reversing digits and then squaring equals the result of first squaring and then reversing.

Original entry on oeis.org

0, 1, 2, 3, 11, 12, 13, 21, 22, 31, 101, 102, 103, 111, 112, 113, 121, 122, 201, 202, 211, 212, 221, 301, 311, 1001, 1002, 1003, 1011, 1012, 1013, 1021, 1022, 1031, 1101, 1102, 1103, 1111, 1112, 1113, 1121, 1122, 1201, 1202, 1211, 1212, 1301, 2001, 2002, 2011
Offset: 1

Views

Author

Labos Elemer, Jun 27 2003

Keywords

Comments

Only digits {0, 1, 2, 3} seem to arise.
Numbers (other than 0) that end in zero are excluded. - N. J. A. Sloane, Mar 20 2010

Examples

			n = 13 is a term because 31^2 = 961 = rev(169) = rev(13^2) = rev(rev(31)^2).
		

References

  • David Wells, The Dictionary of Curious and Interesting Numbers. London: Penguin Books (1997): p. 124.

Crossrefs

Cf. A085306. See A061909 for another version.

Programs

  • Magma
    [0] cat [ m: n in [1..1810] | Reverse(Intseq(m^2)) eq Intseq(Seqint(Reverse(Intseq(m)))^2) where m is n+Floor((n-1)/9) ];  // Bruno Berselli, Jul 08 2011
    
  • Mathematica
    rt[x_] := tn[Reverse[IntegerDigits[x]]] Do[s = rt[n^2]; s1=rt[n]^2; If[Equal[s, s1]&&!Equal[Mod[n, 10], 0], Print[{n, s, rt[s1]}]], {n, 0, 1000000}]
    (* Second program: *)
    Select[Range[0, 1999], Mod[#,10] != 0 && FromDigits[Reverse[IntegerDigits[#^2]]] == FromDigits[Reverse[IntegerDigits[#]]]^2 &] (* Alonso del Arte, Oct 08 2012; corrected by Jean-François Alcover, Jan 11 2021 *)
  • PARI
    isok(x) = (x==0) || ((x%10) && fromdigits(Vecrev(digits(x^2))) == fromdigits(Vecrev(digits(x)))^2); \\ Michel Marcus, Jan 11 2021

Formula

Solutions to rev(x^2) = rev(x)^2.

A169950 Consider the 2^n monic polynomials f(x) with coefficients 0 or 1 and degree n. Sequence gives triangle read by rows, in which T(n,k) (n>=0) is the number of such polynomials of thickness k (1 <= k <= n+1).

Original entry on oeis.org

1, 1, 1, 1, 2, 1, 1, 5, 1, 1, 1, 8, 4, 2, 1, 1, 13, 8, 8, 1, 1, 1, 20, 15, 18, 7, 2, 1, 1, 33, 23, 45, 13, 11, 1, 1, 1, 48, 44, 86, 36, 28, 10, 2, 1, 1, 75, 64, 184, 70, 84, 18, 14, 1, 1, 1, 100, 117, 332, 166, 188, 68, 36, 13, 2, 1, 1, 145, 173, 657, 282, 482, 134, 132, 23, 17, 1, 1
Offset: 0

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

Comments

The thickness of a polynomial f(x) is the magnitude of the largest coefficient in the expansion of f(x)^2.

Examples

			Triangle begins:
n\k  [1]   [2]   [3]   [4]   [5]   [6]   [7]   [8]   [9]   [10]  [11]  [12]
[0]  1;
[1]  1,    1;
[2]  1,    2,    1;
[3]  1,    5,    1,    1;
[4]  1,    8,    4,    2,    1;
[5]  1,    13,   8,    8,    1,    1;
[6]  1,    20,   15,   18,   7,    2,    1;
[7]  1,    33,   23,   45,   13,   11,   1,    1;
[8]  1,    48,   44,   86,   36,   28,   10,   2,    1;
[9]  1,    75,   64,   184,  70,   84,   18,   14,   1,    1;
[10] 1,    100,  117,  332,  166,  188,  68,   36,   13,   2,    1;
[11] 1,    145,  173,  657,  282,  482,  134,  132,  23,   17,   1,    1;
[12] ...
For n = 3, the eight polynomials, their squares and thicknesses are as follows:
x^3, x^6, 1
x^3+1, x^6+2*x^3+1, 2
x^3+x, x^6+2*x^4+x^2, 2
x^3+x+1, x^6+2*x^4+2*x^3+x^2+2*x+1, 2
x^3+x^2, x^6+2*x^5+x^4, 2
x^3+x^2+1, x^6+2*x^5+2*x^3+x^4+2*x^2+1, 2
x^3+x^2+x, x^6+2*x^5+3*x^4+2*x^3+x^2, 3
x^3+x^2+x+1, x^6+2*x^5+3*x^4+4*x^3+3*x^2+2*x+1, 4
Hence T(3,1) = 1, T(3,2) = 5, T(3,3) = 1, T(3,4) = 1.
		

Crossrefs

Related to thickness: A169940-A169954, A061909, A274036.

Programs

  • Mathematica
    Last /@ Tally@ # & /@ Table[Max@ CoefficientList[SeriesData[x, 0, #, 0, 2^n, 1]^2, x] &@ IntegerDigits[#, 2] & /@ Range[2^n, 2^(n + 1) - 1], {n, 12}] // Flatten (* Michael De Vlieger, Jun 08 2016 *)
  • PARI
    seq(n) = {
      my(a = vector(n+1, k, vector(k)), x='x);
      for(k = 1, 2^(n+1)-1, my(pol = Pol(binary(k), x));
           a[poldegree(pol)+1][vecmax(Vec(sqr(pol)))]++);
      return(a);
    };
    concat(seq(11))  \\ Gheorghe Coserea, Jun 06 2016

Formula

Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?

Extensions

Rows 17-30 of the triangle from Nathaniel Johnston, Nov 15 2010

A067552 a(n) = SumOfDigits(n)^2 - SumOfDigits(n^2), where SumOfDigits = A007953.

Original entry on oeis.org

0, 0, 0, 0, 9, 18, 27, 36, 54, 72, 0, 0, 0, 0, 9, 27, 36, 45, 72, 90, 0, 0, 0, 9, 18, 36, 45, 63, 81, 108, 0, 0, 18, 18, 36, 54, 63, 81, 108, 135, 9, 9, 18, 27, 45, 72, 90, 108, 135, 162, 18, 27, 36, 45, 63, 90, 108, 126, 153, 180, 27, 36, 45, 54, 81, 108, 126, 144, 180, 207
Offset: 0

Views

Author

Reinhard Zumkeller, Jan 28 2002

Keywords

Comments

All terms are divisible by 9; see A069912 for the quotient. - Ivan Neretin, Sep 01 2016

Examples

			a(16) = SumOfDigits(16)^2 - SumOfDigits(16^2) = (1+6)^2 - SumOfDigits(256) = 7^2 - (2+5+6) = 49 - 13 = 36.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Plus @@ IntegerDigits[n]^2 - Plus @@ (IntegerDigits[n^2]); Table[ f[n], {n, 0, 100}]
  • PARI
    a(n) = sumdigits(n)^2 - sumdigits(n^2); \\ Michel Marcus, Sep 01 2016

Formula

a(n) = A007953(n)^2 - A004159(n).

Extensions

Edited by Robert G. Wilson v, May 04 2002

A169945 Consider the 2^(n+1) polynomials f(x) with coefficients 0 or 1 and degree <= n. Sequence gives triangle read by rows, in which T(n,k) (n>=0) is the number of such polynomials of thickness k (0 <= k <= n+1).

Original entry on oeis.org

1, 1, 1, 2, 1, 1, 3, 3, 1, 1, 4, 8, 2, 1, 1, 5, 16, 6, 3, 1, 1, 6, 29, 14, 11, 2, 1, 1, 7, 49, 29, 29, 9, 3, 1, 1, 8, 82, 52, 74, 22, 14, 2, 1, 1, 9, 130, 96, 160, 58, 42, 12, 3, 1, 1, 10, 205, 160, 344, 128, 126, 30, 17, 2, 1, 1, 11, 305, 277, 676, 294, 314, 98, 53, 15, 3, 1
Offset: 0

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

Comments

The thickness of a polynomial f(x) is the magnitude of the largest coefficient in the expansion of f(x)^2.

Examples

			Triangle begins:
  [1, 1]
  [1, 2, 1]
  [1, 3, 3, 1]
  [1, 4, 8, 2, 1]
  [1, 5, 16, 6, 3, 1]
  [1, 6, 29, 14, 11, 2, 1]
  [1, 7, 49, 29, 29, 9, 3, 1]
  [1, 8, 82, 52, 74, 22, 14, 2, 1]
  [1, 9, 130, 96, 160, 58, 42, 12, 3, 1]
  [1, 10, 205, 160, 344, 128, 126, 30, 17, 2, 1]
  [1, 11, 305, 277, 676, 294, 314, 98, 53, 15, 3, 1]
  [1, 12, 450, 450, 1333, 576, 796, 232, 185, 38, 20, 2, 1]
  [1, 13, 654, 712, 2477, 1177, 1796, 628, 501, 147, 64, 18, 3, 1]
  [1, 14, 947, 1086, 4563, 2212, 4075, 1370, 1425, 368, 251, 46, 23, 2, 1]
  [1, 15, 1343, 1657, 7997, 4289, 8535, 3265, 3515, 1117, 729, 205, 75, 21, 3, 1]
  ...
For n=2 the eight polynomials and their squares are:
  0, 0
  1, 1
  x, x^2
  x+1, x^2+2*x+1
  x^2, x^4
  x^2+1, x^4+2*x^2+1
  x^2+x, x^4+2*x^3+x^2
  x^2+x+1, x^4+2*x^3+3*x^2+2*x+1
Their thicknesses are respectively 0,1,1,2,1,2,2,3, so T(2,0)=1, T(2,1)=T(2,2)=3, T(2,3)=1.
Contribution from _R. J. Mathar_, Aug 02 2010: (Start)
  1 16 1902 2448 14044 7686 17976 6728 8918 2586 2290 532 326 54 26 2 1
  1 17 2648 3636 23784 13932 35810 14690 20444 6928 6008 1798 990 272 86 24 3 1
  1 18 3675 5280 40196 24032 71374 29056 47604 15326 16590 4380 3384 724 410 62 29 2 1
  1 19 5015 7635 66066 42072 135876 59854 103298 37122 40660 12868 9346 2690 1290 348 97 27 3 1
  1 20 6824 10840 108419 70782 258898 114262 226282 78760 102664 29858 27848 6814 4752 944 503 70 32 2 1
  1 21 9166 15392 173675 120003 476494 224180 469816 178278 237956 78854 71902 21692 13698 3824 1625 433 108 30 3 1
  1 22 12343 21372 278183 196784 877315 414774 981244 364690 562404 176422 194486 52356 43592 9996 6407 1192 605 78 35 2 1 (End)
		

Crossrefs

Related to thickness: A169940-A169954, A061909.
3rd column gives A143823(n+1)-n-2. - Alois P. Heinz, Sep 16 2011

Programs

  • Mathematica
    pols[n_] := x^Range[0, n].#& /@ Tuples[{0, 1}, n+1];
    row[n_] := Tally[Max /@ CoefficientList[pols[n]^2, x]][[All, 2]];
    Table[row[n], {n, 0, 10}] // Flatten (* Jean-François Alcover, Aug 27 2019 *)

Formula

Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?

A169947 Third entry in row n of triangle in A169945.

Original entry on oeis.org

1, 3, 8, 16, 29, 49, 82, 130, 205, 305, 450, 654, 947, 1343, 1902, 2648, 3675, 5015, 6824, 9166, 12343, 16393, 21762, 28682, 37695, 49055, 63892, 82610, 106691, 136643, 174862, 222524, 283073, 357691, 451538, 567498, 712817, 890365, 1112040, 1382374, 1717497
Offset: 1

Views

Author

N. J. A. Sloane, Aug 01 2010

Keywords

Crossrefs

Related to thickness: A169940-A169954, A061909.

Programs

  • Mathematica
    b[n_, s_] := Module[{sn, m}, If[n<1, 1, sn = Append[s, n]; m = Length[sn]; If[m*(m - 1)/2 == Length[Table[sn[[i]] - sn[[j]], {i, 1, m - 1}, {j, i+1, m}] // Flatten // Union], b[n - 1, sn], 0] + b[n - 1, s]]];
    c[n_] := c[n] = b[n - 1, {n}] + If[n == 0, 0, c[n - 1]];
    a[n_] := c[n + 1] - n - 2;
    Table[Print[n, " ", a[n]]; a[n], {n, 1, 64}] (* Jean-François Alcover, Sep 02 2019, after Alois P. Heinz in A143823 *)

Formula

Wanted: a recurrence. Are any of A169940-A169954 related to any other entries in the OEIS?
a(n) = A143823(n+1) - n - 2. - Nathaniel Johnston, Nov 12 2010

Extensions

More terms from R. J. Mathar, Aug 02 2010
a(22)-a(28) from Nathaniel Johnston, Nov 12 2010
More terms from Alois P. Heinz, Sep 16 2011

A319478 a(n) is the least base b > 1 such that the product n * n can be computed without carry by long multiplication.

Original entry on oeis.org

2, 2, 2, 3, 2, 4, 5, 5, 2, 3, 3, 5, 3, 6, 7, 7, 2, 4, 9, 9, 4, 4, 10, 11, 11, 5, 5, 3, 3, 13, 3, 3, 2, 11, 11, 5, 3, 3, 6, 13, 13, 13, 6, 6, 6, 15, 15, 15, 6, 7, 5, 5, 17, 17, 18, 5, 7, 7, 7, 19, 19, 20, 20, 7, 2, 4, 8, 22, 4, 4, 17, 23, 6, 6, 8, 24, 19, 19, 6
Offset: 0

Views

Author

Rémy Sigrist, Nov 21 2018

Keywords

Comments

Apparently, a(n) is also the least base b > 1 where the square of the digital sum of n equals the digital sum of the square of n.
The sequence is well defined as, for any n > 0, n * n can be computed without carry in base n^2 + 1.

Crossrefs

See A321882 for the additive variant.

Programs

  • Mathematica
    Array[Block[{b = 2}, While[AnyTrue[With[{d = IntegerDigits[#, b]}, Function[{s, t}, Total@ Map[PadLeft[#, t] &, s]] @@ {#, Max[Length /@ #]} &@ MapIndexed[Join[d #, ConstantArray[0, First@ #2 - 1]] &, Reverse@ d]], # >= b &], b++]; b] &, 79, 0] (* Michael De Vlieger, Nov 25 2018 *)
  • PARI
    a(n) = for (b=2, oo, my (d=if(n==0, [0], digits(n,b))); if (vecmax(d)^2
    				

Formula

a(n) = 2 iff n belongs to A131577.
a(n * a(n)) <= a(n).
a(A061909(n)) <= 10 for any n > 0.
Previous Showing 11-20 of 36 results. Next