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 61-70 of 71 results. Next

A325450 Numbers k such that sum of digits (k) and sum of digits (k^2) is 9.

Original entry on oeis.org

9, 18, 45, 90, 180, 351, 450, 900, 1800, 3510, 4500, 9000, 18000, 35100, 45000, 90000, 180000, 351000, 450000, 900000, 1800000, 3510000, 4500000, 9000000, 18000000
Offset: 1

Views

Author

Vincenzo Librandi, May 10 2019

Keywords

Comments

A007953(A058369(n)) begins with 1, 9, 1, 9, 10, 9, 10, 10, 9, 18, ...; the 1's come from A011557, the 9's come from this sequence, the 10's come from A325451.

Examples

			a(3) = 45 because 4+5 = 9, 45^2 = 2025, and 2+0+2+5 = 9.
		

Crossrefs

Subsequence of A058369 (k and k^2 have same digit sum).

Programs

  • Magma
    [n: n in [1..2*10^7] | &+Intseq(n^2) eq 9  and &+Intseq(n) eq 9];
  • Mathematica
    Select[Range[2 10^7], Total[IntegerDigits[#]]==9&& Total[IntegerDigits[#^2]]==9&]

A325451 Numbers k such that sum of digits (k) and sum of digits (k^2) is 10.

Original entry on oeis.org

19, 46, 55, 145, 190, 361, 451, 460, 550, 1450, 1900, 3610, 4510, 4600, 5500, 14500, 19000, 20251, 36100, 45100, 46000, 55000, 145000, 190000, 202510, 361000, 451000, 460000, 550000, 1450000, 1900000, 2025100, 3610000, 4510000, 4600000, 5500000, 14500000
Offset: 1

Views

Author

Vincenzo Librandi, May 10 2019

Keywords

Comments

Subsequence of A058369 (k and k^2 have same digit sum).
A007953(A058369(n)) begins with 1, 9, 1, 9, 10, 9, 10, 10, 9, 18, ...: the 1's come from A011557, the 9's come from A325450, and the 10's come from this sequence.

Examples

			a(4) = 145 because 1+4+5 = 10, 145^2 = 21025, and 2+1+0+2+5 = 10.
		

Crossrefs

Programs

  • Magma
    [n: n in [1..2*10^7] | &+Intseq(n^2) eq 10  and &+Intseq(n) eq 10];
  • Mathematica
    Select[Range[2 10^7], Total[IntegerDigits[#]]==10 && Total[IntegerDigits[#^2]]==10 &]

A351651 a(n) is the quotient obtained when digsum(m^2) is divided by digsum(m), with digsum = sum of digits = A007953 and m = A351650(n).

Original entry on oeis.org

1, 2, 3, 1, 1, 2, 3, 4, 1, 1, 2, 3, 4, 3, 2, 3, 4, 3, 2, 3, 1, 1, 2, 1, 3, 2, 2, 2, 1, 2, 1, 1, 2, 3, 4, 2, 2, 3, 4, 5, 3, 3, 4, 5, 3, 3, 2, 4, 3, 2, 2, 1, 2, 2, 2, 1, 1, 1, 2, 1, 1, 2, 3, 4, 3, 3, 2, 3, 4, 5, 3, 2, 4, 5, 2, 2, 3, 3, 3, 3, 2, 2, 2, 3, 2, 1, 3, 4, 3, 4, 5
Offset: 1

Views

Author

Bernard Schott, Feb 16 2022

Keywords

Comments

All positive integers are terms of this sequence (see A280012).
a(n) = 1 iff m = A351650(n) is a term of A058369 \ {0}.
a(n) = digsum(n) if m = A351650(n) is a term of A061909 \ {0}.

Examples

			A351650(8) = 13, then digsum(13) = 1+3 = 4 while digsum(13^2) = digsum(169) = 1+6+9 = 16; hence, a(8) = 16/4 = 4.
		

Crossrefs

Programs

  • Mathematica
    Select[Total[IntegerDigits[#^2]]/Total[IntegerDigits[#]]& /@ Range[300], IntegerQ] (* Amiram Eldar, Feb 16 2022 *)
  • PARI
    lista(nn) = {my(list = List(), q); for (n=1, nn, if (denominator(q=sumdigits(n^2)/sumdigits(n))==1, listput(list, q));); Vec(list);} \\ Michel Marcus, Feb 16 2022

Formula

a(n) = A004159(A351650(n)) / A007953(A351650(n)).

Extensions

More terms from Michel Marcus, Feb 16 2022

A355505 a(n) is the number of distinct cycles when iterating the function f_n(x), where f_n(x) is the sum of the digits in base n of x^2.

Original entry on oeis.org

2, 5, 3, 4, 4, 7, 4, 3, 4, 6, 4, 7, 4, 8, 6, 3, 3, 7, 5, 7, 9, 7, 4, 6, 4, 7, 5, 9, 5, 12, 7, 3, 9, 5, 8, 9, 5, 10, 9, 6, 4, 16, 8, 9, 8, 7, 5, 7, 9, 7, 7, 8, 4, 9, 8, 8, 11, 9, 4, 14, 7, 13, 11, 3, 8, 16, 7, 6, 9, 16, 8, 8, 5, 9, 9, 11, 13, 17, 7, 6, 6, 7, 5, 17, 6, 15, 11, 9, 4
Offset: 2

Views

Author

Wouter Zandsteeg, Jul 04 2022

Keywords

Comments

The trajectory from every starting point will enter a cycle given a sufficient number of iterations of f_n.
To determine a(n), only starting points 0, 1, 2, ..., n^2 have to be checked for cycles. Larger starting points will always lead to a cycle reached from one (or more) of 0, 1, 2, ..., n^2.
From Iain Fox, Jul 09 2022: (Start)
Since f_n(x) <= (n-1)*(1 + floor(2*log_n(x))), only numbers less than the largest zero of (n-1)*(1 + floor(2*log_n(x))) - x need to be checked.
The value mentioned above is less than or equal to (2-2n)*W_{-1}(log(n)/((2-2n)*sqrt(n)))/log(n) where W_k(x) is the k-th branch of the Lambert W function. (End)

Examples

			a(8) = 4 because there are 4 cycles for n = 8:
  f_8(0) = 0 (since 0^2 = 0 = 0_8, with digit sum 0),
  f_8(1) = 1 (1^2 = 1 = 1_8, with digit sum 1),
  f_8(4) = 2 (4^2 = 20_8) and f_8(2) = 4 (2^2 = 4_8), and
  f_8(7) = 7 (7^2 = 61_8, with digit sum 7).
		

Crossrefs

Programs

  • PARI
    a(n) = my(d=1); while(d<=logint(((n-1)*d)^2, n)+1, d++); my(l=(n-1)*(d-1)+1, x=vector(l, i, l-i), y=[], z=[], j, c=0); for(i=1, #x, y=setunion(y, z); j=x[i]; z=[]; while(!setsearch(z, j), if(setsearch(y, j), next(2)); z=setunion(z, [j]); j=sumdigits(j^2, n)); c++); c \\ Iain Fox, Jul 09 2022

A369956 a(n) is the least integer m such that the sum of the digits of m^2 is k+n where k is the number of digits of n.

Original entry on oeis.org

1, 101, 11, 2, 149, 32, 4, 12, 3, 8, 106, 16, 7, 103, 13, 108, 24, 17, 1019, 124, 43, 1013, 113, 67, 114, 63, 10024, 1024, 133, 83, 1067, 167, 1044, 264, 314, 10087, 1303, 313, 10093, 1183, 707, 1374, 1333, 836, 10343, 1667, 100264, 10714, 2236, 10386, 3114
Offset: 0

Views

Author

Zhining Yang, Feb 06 2024

Keywords

Examples

			a(5)=32 because 32 is the least integer with 2 digits and 32^2=1024 and 1+0+2+4=2+5.
		

Crossrefs

Programs

  • Mathematica
    Table[SelectFirst[Range@200000,Total[IntegerDigits[#^2]]==n+Length@IntegerDigits@#&],{n,0,50}]

A061806 Numbers n such that the iterative cycle: n -> sum of digits of n^2 has only three distinct elements.

Original entry on oeis.org

4, 5, 17, 26, 28, 32, 37, 40, 43, 44, 49, 50, 53, 62, 63, 64, 67, 73, 74, 76, 77, 82, 83, 86, 87, 88, 89, 91, 92, 93, 94, 97, 98, 107, 109, 113, 114, 116, 117, 118, 122, 124, 125, 126, 127, 128, 133, 137, 141, 143, 149, 154, 157, 158, 161, 164, 166, 167, 169, 170
Offset: 1

Views

Author

Asher Auel, May 17 2001

Keywords

Examples

			4 -> 1+6 = 7 -> 4+9 = 13 -> 1+6+9 = 16 -> 2+5+6 = 13, thus {7,13,16} are the only distinct elements of the iterative cycle of 4.
		

Crossrefs

A061905 The iterative cycle: n -> sum of digits of n^2 has only two distinct elements.

Original entry on oeis.org

7, 8, 13, 14, 16, 19, 22, 23, 24, 25, 27, 29, 31, 33, 34, 35, 36, 38, 41, 42, 46, 47, 52, 54, 55, 56, 57, 58, 59, 61, 65, 66, 68, 69, 70, 71, 72, 75, 78, 79, 80, 81, 84, 85, 95, 96, 99, 103, 104, 106, 108, 112, 115, 119, 121, 123, 129, 130, 131, 132, 135, 138, 139, 140
Offset: 1

Views

Author

Asher Auel, May 17 2001

Keywords

Comments

It seems that {10,1}, {13,16} and {9,18} are the only iterative cycles with 2 distinct elements.

Examples

			7 -> 4+9 = 13 -> 1+6+9 = 16 -> 2+5+6 = 13, thus only {13,16} are contained in the iterative cycle of 7. 24 -> 5+7+6 = 18 -> 3+2+4 = 9 -> 8+1 = 9, thus {18,9} are the only elements of the iterative cycle of 24.
		

Crossrefs

A239937 Numbers k such that DigitSum(k^2) > DigitSum((k+1)^2).

Original entry on oeis.org

3, 7, 8, 9, 14, 17, 19, 24, 26, 28, 29, 31, 33, 34, 37, 38, 39, 43, 44, 47, 48, 53, 54, 57, 59, 63, 64, 67, 69, 70, 74, 77, 78, 79, 83, 84, 87, 88, 89, 93, 94, 97, 98, 99, 104, 107, 109, 114, 117, 118, 119, 122, 124, 126, 128, 129, 133, 134, 137, 138, 141, 143
Offset: 1

Views

Author

Oliver Bel, Mar 29 2014

Keywords

Examples

			For k=3, we have DigitSum(3^2) = 9 > 7 = DigitSum(4^2).
		

Crossrefs

Cf. A007953 (sum of digits of n), A004159 (sum of digits of n^2).

Programs

Extensions

More terms from Jon E. Schoenfield, Mar 29 2014

A357080 Numbers k such that the sum of the digits of k multiplied by the sum of the digits of k^2 equals k.

Original entry on oeis.org

0, 1, 80, 162, 243, 476, 486
Offset: 1

Views

Author

Tanya Khovanova, Sep 10 2022

Keywords

Comments

Suppose k has m digits, then the sum of the digits of k multiplied by the sum of the digits of k^2 is bounded by 9m times 9*(2m), which equals 162m^2. On the other hand, k is greater than 10^(m-1), which grows much faster than 162m^2. It follows that k can't have more than 4 digits.

Examples

			The sum of the digits of 80 is 8, the sum of the digits of 80^2 = 6400 is 10. The number 80 itself is 8*10. Thus, 80 is in this sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[100000], # == Total[IntegerDigits[#]] Total[IntegerDigits[#^2]] &]
  • PARI
    isok(k) = k == sumdigits(k)*sumdigits(k^2); \\ Michel Marcus, Sep 11 2022
    
  • Python
    def sd(n): return sum(map(int, str(n)))
    def ok(n): return sd(n) * sd(n*n) == n
    print([k for k in range(10**5) if ok(k)]) # Michael S. Branicky, Sep 11 2022

A362069 Numbers k such that k+digitsum(k^2) is a square.

Original entry on oeis.org

0, 17, 62, 71, 117, 125, 197, 206, 296, 297, 305, 413, 414, 557, 558, 692, 702, 711, 863, 864, 872, 873, 1062, 1070, 1071, 1268, 1493, 1502, 1727, 1736, 1737, 1745, 1998, 2006, 2267, 2276, 2285, 2564, 2565, 2573, 2879, 2888, 2889, 3221, 3222
Offset: 1

Views

Author

Alexandru Petrescu, May 17 2023

Keywords

Comments

Conjecture: there are infinitely many pairs of consecutive terms. Example: (296,297); (413,414); (863,864).

Examples

			k=17 is a term because k^2=289 and 17+2+8+9=36=6^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 3300], IntegerQ[Sqrt[# + Plus @@ IntegerDigits[#^2]]] &] (* Amiram Eldar, May 18 2023 *)
  • PARI
    isok(k)=issquare(k+sumdigits(k^2))
Previous Showing 61-70 of 71 results. Next