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

A061268 Numbers k such that k^2 has property that the sum of its digits and the product of its digits are nonzero squares.

Original entry on oeis.org

1, 2, 3, 12, 21, 122, 212, 221, 364, 463, 518, 537, 543, 589, 661, 715, 786, 969, 1111, 1156, 1354, 1525, 1535, 1608, 1617, 1667, 1692, 1823, 1941, 2166, 2235, 2337, 2379, 2515, 2943, 2963, 3371, 3438, 3631, 3828, 4018, 4077, 4119, 4271, 4338, 4341, 4471
Offset: 1

Views

Author

Amarnath Murthy, Apr 24 2001

Keywords

Comments

See A061267 for the corresponding squares (the so-called ultrasquares). - M. F. Hasler, Oct 25 2022

Examples

			212^2 = 44944, 4+4+9+4+4 = 25 = 5^2 and 4*4*9*4*4 = 2304 = 48^2.
		

References

  • Amarnath Murthy, Infinitely many common members of the Smarandache Additive as well as multiplicative square sequence, (To be published in Smarandache Notions Journal).
  • Felice Russo, A set of new Smarandache functions, sequences and conjectures in number theory, American Research Press 2000

Crossrefs

Cf. A061267 (the corresponding squares), A053057 (squares with square digit sum), A053059 (squares with square product of digits).
Sequence A061868 allows digit products = 0.

Programs

  • PARI
    select( {is_A061268(n)=vecmin(n=digits(n^2))&&issquare(vecprod(n))&&issquare(vecsum(n))}, [1..4567]) \\ M. F. Hasler, Oct 25 2022

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 11 2001

A345336 Prime numbers p such that the sum and the product of digits of p^2 are both squares.

Original entry on oeis.org

2, 3, 101, 103, 257, 283, 347, 401, 463, 491, 499, 509, 571, 599, 653, 661, 743, 751, 797, 1013, 1021, 1031, 1039, 1103, 1201, 1229, 1237, 1301, 1381, 1399, 1427, 1453, 1499, 1553, 1571, 1597, 1667, 1733, 1741, 1759, 1823, 2003, 2011
Offset: 1

Views

Author

Tanya Khovanova, Jun 14 2021

Keywords

Comments

Primes in A061868.

Examples

			101^2 = 10201. The sum of the digits is 4, the product is 0: both are squares. Thus, 101 is in the sequence.
		

Crossrefs

Cf. A061868.

Programs

  • Maple
    filter:= proc(n) local L;
      if not isprime(n) then return false fi;
      L:= convert(n^2,base,10);
      issqr(convert(L,`+`)) and issqr(convert(L,`*`))
    end proc:
    select(filter, [$1..10000]); # Robert Israel, Jun 17 2021
  • Mathematica
    Select[Range[3000], PrimeQ[#] && IntegerQ[Sqrt[Total[IntegerDigits[#^2]]]] && IntegerQ[Sqrt[Times @@ IntegerDigits[#^2]]] &]
    Select[Prime[Range[3500]],With[{c=IntegerDigits[#^2]},AllTrue[{Sqrt[Total[c]],Sqrt[Times@@c]},IntegerQ]]&] (* Harvey P. Dale, Feb 05 2025 *)
  • PARI
    isok(p) =if (isprime(p), my(d=digits(p^2)); issquare(vecsum(d)) && issquare(vecprod(d))); \\ Michel Marcus, Jun 14 2021
    
  • Python
    from numbthy import isprime
    counter = 1
    for p in range (2,1090821):
        if isprime(p) and (counter <= 10000):
            pp_product = 1
            pp_sum = 0
            for digit in range (0, len(str(p*p))):
                pp_product *= int(str(p*p)[digit])
                pp_sum += int(str(p*p)[digit])
            if pow(int(pp_product**0.5),2) == pp_product:
                if pow(int(pp_sum**0.5),2) == pp_sum:
                    print(counter, p)
                    counter += 1; # Karl-Heinz Hofmann, Jun 17 2021
Showing 1-2 of 2 results.