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

A355497 Numbers k such that x^2 - s*x + p has only integer roots, where s and p denote the sum and product of the digits of k respectively.

Original entry on oeis.org

0, 4, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80
Offset: 1

Views

Author

Jean-Marc Rebert, Jul 04 2022

Keywords

Comments

All 2-digit numbers are terms.
All numbers having 0 as a digit (A011540) are terms, because p = 0, x^2 - s*x + p = x*(x-s) and the roots 0 and s are integers.

Examples

			k = 14 is a term, since the sum of the digits of 14 is 5, the product of the digits of 14 is 4 and the roots 1 and 4 of x^2 - 5x + 4 are all integers.
		

Crossrefs

Complement of A355547. A011540 is a subsequence.
Cf. A007953, A007954, A355574 (number of n-digit terms).

Programs

  • Mathematica
    kmax=80;kdig:=IntegerDigits[k]; s:=Total[kdig]; p:=Product[Part[kdig,i],{i,Length[kdig]}]; a:={};For[k=0,k<=kmax,k++,If[Element[x/.Solve[x^2-s*x+p==0,x],Integers],AppendTo[a,k]]]; a (* Stefano Spezia, Jul 06 2022 *)
  • PARI
    is(n)=my(v=if(n,digits(n),[0])); issquare(vecsum(v)^2-4*vecprod(v))

Formula

a(n) = n + O(n^k) where k = log(9)/log(10) = 0.95424.... - Charles R Greathouse IV, Jul 07 2022

A355574 Number of nonnegative integers k with n digits such that x^2 - s*x + p has only integer roots, where s and p denote the sum and product of the digits of k respectively.

Original entry on oeis.org

2, 90, 223, 2686, 31601, 370894, 4220160, 46962379, 512600193
Offset: 1

Views

Author

Stefano Spezia, Jul 07 2022

Keywords

Comments

a(n) is the number of n-digit numbers in A355497.

Crossrefs

Formula

a(n) <= A063945(n).
Limit_{n->oo} a(n)/a(n-1) = 10.

Extensions

a(8)-a(9) from Jean-Marc Rebert, Jul 13 2022

A355608 Zeroless numbers k such that x^2 - s*x + p has only integer roots, where s and p denote the sum and product of the digits of k respectively.

Original entry on oeis.org

4, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 89, 91, 92, 93, 94, 95, 96, 97, 98, 99, 122, 134, 143, 146
Offset: 1

Views

Author

Jean-Marc Rebert, Jul 09 2022

Keywords

Comments

Intersection of A052382 (zeroless numbers) and A355497.
There are respectively 1, 81, 52, 247, 650, 2335, 3129, 9100, 20682 terms with 1, 2, ..., 9 digits.

Examples

			k = 4 is a term, since 4 is zeroless, the sum of the digits of 4 is 4, the product of the digits of 4 is 4 and the root 2 of x^2 - 4x + 4 is an integer.
		

Crossrefs

Cf. A007953, A007954, A052382 (zeroless numbers).

Programs

  • Maple
    isA355608 := proc(n)
        local dgs,p,s ;
        dgs := convert(n,base,10) ;
        p := mul(d,d=dgs) ;
        s := add(d,d=dgs) ;
        if p <> 0 then
            -s/2+sqrt(s^2/4-p) ;
            if type(simplify(%),integer) then
                -s/2-sqrt(s^2/4-p) ;
                if type(simplify(%),integer) then
                    true ;
                else
                    false ;
                end if;
            else
                false ;
            end if;
        else
            false ;
        end if ;
    end proc:
    for n from 1 to 180 do
        if isA355608(n) then
            printf("%d,",n) ;
        end if;
    end do: # R. J. Mathar, Jan 24 2023
  • PARI
    is(n)=my(v=digits(n), c=vecprod(v)); c&& issquare(vecsum(v)^2-4*c)
Showing 1-3 of 3 results.