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.

A344842 Numbers with digits in nondecreasing order whose digit sum is prime and whose digit product is a perfect square > 0.

This page as a plain text file.
%I A344842 #23 Jun 18 2021 18:46:11
%S A344842 11,14,49,111,119,122,128,133,155,166,188,199,229,236,289,368,449,559,
%T A344842 779,1114,1334,1444,1466,1477,1499,2249,2489,3349,4559,4889,4999,
%U A344842 11111,11119,11122,11128,11144,11155,11177,11188,11236,11339,11368,11449,11669,11999,12233
%N A344842 Numbers with digits in nondecreasing order whose digit sum is prime and whose digit product is a perfect square > 0.
%C A344842 Primitive sequence of A344825.
%H A344842 David A. Corneth, <a href="/A344842/b344842.txt">Table of n, a(n) for n = 1..29793</a> (terms <= 10^15)
%e A344842 49 is in the sequence as its product of digits is 36 which is a perfect square > 0 and its sum of digits is 13 which is prime.
%t A344842 ndoQ[n_]:=Module[{id=IntegerDigits[n]},FreeQ[id,0]&&Min[ Differences[id]]> = 0&&PrimeQ[Total[id]]&&IntegerQ[Sqrt[Times@@id]]]; Select[Range[ 12500],ndoQ] (* _Harvey P. Dale_, Jun 18 2021 *)
%o A344842 (Python)
%o A344842 from math import prod
%o A344842 from sympy import isprime, integer_nthroot
%o A344842 from itertools import combinations_with_replacement as mc
%o A344842 def ok(s):
%o A344842   d = list(map(int, s))
%o A344842   return '0' not in s and isprime(sum(d)) and integer_nthroot(prod(d), 2)[1]
%o A344842 def auptod(digits): return [int("".join(p)) for d in range(2, digits+1) for p in mc("123456789", d) if ok("".join(p))]
%o A344842 print(auptod(5)) # _Michael S. Branicky_, May 29 2021
%o A344842 (PARI) uptoqdigits(n) = { my(res = List()); for(j = 2, n, forvec(x = vector(j, i, [1,9]), if(issquare(vecprod(x)) && isprime(vecsum(x)), listput(res, fromdigits(x)) ) , 1 ) ); res }
%Y A344842 Cf. A009994, A344825.
%K A344842 nonn,base
%O A344842 1,1
%A A344842 _David A. Corneth_, May 29 2021
%E A344842 Definition (Name) corrected by _Harvey P. Dale_, Jun 18 2021