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 21-23 of 23 results.

A176760 Numbers k such that k^2 and k^4 have the same sum of digits.

Original entry on oeis.org

0, 1, 3, 10, 17, 19, 27, 30, 57, 93, 100, 170, 190, 219, 267, 270, 300, 314, 327, 359, 387, 417, 423, 424, 570, 685, 693, 807, 828, 891, 917, 930, 963, 1000, 1207, 1223, 1317, 1333, 1673, 1693, 1700, 1827, 1864, 1900, 1917, 2141, 2190, 2202, 2213, 2364, 2367
Offset: 1

Views

Author

Ulrich Krug (leuchtfeuer37(AT)gmx.de), Apr 25 2010

Keywords

Comments

Let sod(n) := digital sum of n (A007953); here we have sod(n^2) = sod(n^4).
Trivial cases:
(I) Powers of 10, as sod((10^k)^2) = sod((10^k)^4) = 1.
(II) If N is a term of sequence, then so is 10 * N.

Examples

			sod(3^2) = sod(9) = 9 = sod(81) = sod(3^4), so 3 is a term.
sod(17^2) = sod(289) = 19 = sod(83521) = sod(17^4), so 17 is a term.
		

References

  • Hans Schubart, Einfuehrung in die klassische und moderne Zahlentheorie, Vieweg, Braunschweig, 1974.

Crossrefs

Programs

  • Mathematica
    Select[Range[0,2000],Total[IntegerDigits[#^2]]==Total[IntegerDigits[#^4]]&]  (* Harvey P. Dale, Jan 19 2011 *)

Extensions

Edited by D. S. McNeil, Nov 21 2010
a(43)-a(51) from Jason Yuen, Oct 13 2024

A357756 a(n) is the least k > 0 such that A007953(n*k) equals A007953((n*k)^2), where A007953 is the sum of the digits.

Original entry on oeis.org

1, 1, 5, 3, 25, 2, 3, 27, 62, 1, 1, 5, 15, 27, 128, 3, 31, 17, 1, 1, 5, 9, 9, 2, 75, 4, 18, 7, 64, 5, 3, 16, 56, 3, 85, 17, 5, 27, 5, 9, 25, 9, 45, 13, 27, 1, 1, 27, 66, 54, 2, 9, 9, 18, 22, 1, 32, 15, 25, 135, 3, 18, 8, 3, 28, 9, 3, 43, 47, 72, 27, 8, 25, 126, 27
Offset: 0

Views

Author

Thomas Scheuerle, Oct 12 2022

Keywords

Comments

A task in the German competition "Bundeswettbewerb Mathematik 2021" was to prove that for each positive integer n there exists a k such that A007953(n*k) = A007953((n*k)^2).
One of the proposed proofs uses the argument that numbers of the form m = (10^x-1)*(10^y) will have the desired property A007953(m) = A007953(m^2). Thus we need to prove that we can find for all n a k, x and y such that n*k = (10^x-1)*(10^y). Let n be of the form b*2^c*5^d with b odd and not divisible by 5, then we know that y = max(c, d). From Euler's totient theorem we know that 10^x-1 will be divisible by e if x = A000010(e) where A000010 is Euler's totient function. See the formula section for the corresponding resulting k.
a(n) will never be divisible by 10.
If n is divisible by 3 but not by 9, then a(n) is divisible by 3. - Robert Israel, Oct 13 2022

Crossrefs

Programs

  • Maple
    f:= proc(n) local k;
       for k from 1 do if sd(n*k) = sd((n*k)^2) then return k fi od
    end proc:
    map(f, [$1..100]); # Robert Israel, Oct 13 2022
  • PARI
    a(n) = {my(k = 1); while(sumdigits(n*k)!=sumdigits((n*k)^2),k++);k}
    
  • Python
    def sd(n): return sum(map(int, str(n)))
    def a(n):
        k = 1
        while not sd(n*k) == sd((n*k)**2): k += 1
        return k
    print([a(n) for n in range(75)]) # Michael S. Branicky, Oct 13 2022

Formula

a(A058369(n)) = 1.
a(a(n)) <= n.
a(n) <= A132740(n)*A060284(A132740(n))*10^A051628(n)/n.
or a(n) <= (10^A000010(A132740(n))-1)*10^A051628(n)/n.

A374024 Integers k such that digsum(k) = digsum(k^2) = p, where p is prime and digsum(i) = A007953(i).

Original entry on oeis.org

199, 289, 379, 388, 496, 559, 568, 595, 739, 775, 838, 955, 1099, 1189, 1198, 1468, 1495, 1585, 1738, 1747, 1765, 1792, 1855, 1990, 2098, 2494, 2665, 2881, 2890, 3169, 3196, 3259, 3349, 3466, 3493, 3745, 3790, 3880, 4249, 4519, 4735, 4951, 4960, 5149, 5482
Offset: 1

Views

Author

Gonzalo Martínez, Jul 05 2024

Keywords

Comments

Subsequence of A058369.
If k is a term, then digsum(k) = 19, 37 or 73, for k < 10^9.
If k is an integer such that digsum(k) = digsum(k^2) = p, with p prime, then p == 1 (mod 9) (A061237).
This sequence has infinitely many terms of the form 1999...9 (A067272). If p is a prime with p == 1 (mod 9), i.e., p = 9m + 1 for some m, then t = 2*10^m - 1 = 1999...9, i.e., 1 followed by m 9's, is in this sequence since digsum(t) = 9m + 1 = p and t^2 = 39...960...01, where there are (m - 1) 9's and (m - 1) 0's, so digsum(t^2) = 3 + 9*(m - 1) + 6 + 1 = 9m + 1 = p. Dirichlet's theorem guarantees the existence of infinitely many primes of the form 9w + 1 and hence infinitely many terms of this sequence.
2*10^m - 1 is the least number with digit sum 9*m + 1. Since the next prime congruent to 1 (mod 9) after 73 is 109 = 9*12 + 1, the first term with digit sum other than 19, 37 or 73 is 2*10^12 - 1. - Robert Israel, Jul 07 2024

Examples

			199 is a term, because its digital sum is 1 + 9 + 9 = 19 and 199^2 = 39601, whose digital sum is 3 + 9 + 6 + 0 + 1 = 19, which is prime.
		

Crossrefs

Programs

  • Maple
    ds:= n -> convert(convert(n,base,10),`+`):
    filter:= proc(n) local p;
      p:= ds(n);
      isprime(p) and ds(n^2) = p
    end proc:
    select(filter, [seq(i,i=1..1000, 9)]); # Robert Israel, Jul 05 2024
  • Mathematica
    Select[Range[5490],PrimeQ[dg=DigitSum[#]]&&(dg==DigitSum[#^2])&] (* Stefano Spezia, Jul 05 2024 *)
  • PARI
    isok(k) = my(s=sumdigits(k)); isprime(s) && (s==sumdigits(k^2)); \\ Michel Marcus, Jul 06 2024
Previous Showing 21-23 of 23 results.