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 11-20 of 22 results. Next

A062398 Numbers such that the product of the digits and the sum of the digits are squares.

Original entry on oeis.org

1, 4, 9, 10, 22, 40, 88, 90, 100, 103, 108, 130, 144, 180, 202, 207, 220, 270, 301, 306, 310, 360, 400, 405, 414, 441, 450, 466, 504, 540, 603, 630, 646, 664, 702, 709, 720, 790, 801, 808, 810, 880, 889, 898, 900, 907, 970, 988, 1000, 1003, 1008, 1012, 1017
Offset: 1

Views

Author

Amarnath Murthy, Jun 28 2001

Keywords

Examples

			144 belongs to the sequence as sum of digits = 9 and the product of the digits = 16.
		

Crossrefs

Intersection of A028839 and A174800.

Programs

  • Mathematica
    pdsdQ[n_]:=Module[{idn=IntegerDigits[n]},IntegerQ[Sqrt[Total[idn]]] && IntegerQ[Sqrt[Times@@idn]]]; Select[Range[1100],pdsdQ] (* Harvey P. Dale, Aug 20 2012 *)
  • PARI
    isok(k)={my(d=digits(k)); issquare(vecsum(d)) && issquare(vecprod(d))} \\ Harry J. Smith, Aug 07 2009

Extensions

Corrected and extended by Erich Friedman, Jul 02 2001

A197125 Numbers such that sum of digits and sum of the square of digits are both a square.

Original entry on oeis.org

1, 4, 9, 10, 40, 90, 100, 400, 900, 1000, 1111, 1177, 1224, 1242, 1339, 1393, 1422, 1717, 1771, 1933, 2124, 2142, 2214, 2241, 2412, 2421, 3139, 3193, 3319, 3391, 3913, 3931, 4000, 4122, 4212, 4221, 4444, 4588, 4669, 4696, 4858, 4885, 4966, 5488, 5848, 5884
Offset: 1

Views

Author

Michel Lagneau, Oct 10 2011

Keywords

Comments

The sequence contains a majority of numbers with two identical digits at least, but there exists a finite subset A = {1, 4, 9, 10, 40, 90, 156789, 156798, ..., 9876510} of 7!+6 = 5046 numbers with distinct decimal digits. The numbers > 90 of A are all permutations of 1567890.

Examples

			597618 is in the sequence because :
5+9+7+6+1+8 = 36 = 6^2 ;
5^2+9^2+7^2+6^2+1^2+8^2 = 256 = 16^2.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 6000 do:l:=evalf(floor(ilog10(n))+1):n0:=n:s1:=0:s2:=0:for m from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10): n0:=v :s1:=s1+u:s2:=s2+u^2: od:if sqrt(s1)=floor(sqrt(s1)) and sqrt(s2)=floor(sqrt(s2)) then printf(`%d, `, n): else fi:od:
  • Mathematica
    sdQ[n_]:=Module[{idn=IntegerDigits[n]},IntegerQ[Sqrt[Total[idn]]] && IntegerQ[Sqrt[Total[idn^2]]]]; Select[Range[6000],sdQ] (* Harvey P. Dale, Oct 25 2011 *)

Formula

a(n) = {A028839} intersection {A175396}.

A244733 Semiprimes sp such that sp plus its digit sum is a perfect square.

Original entry on oeis.org

38, 86, 161, 614, 662, 998, 1145, 1355, 1829, 2189, 2483, 4607, 5027, 5315, 6377, 7199, 8258, 11435, 13214, 15611, 17933, 19574, 20153, 21305, 21878, 24014, 26867, 30599, 32738, 34199, 36077, 38387, 38777, 40778, 42422, 46211, 51509, 52874, 56618, 58541, 59987
Offset: 1

Views

Author

K. D. Bajpai, Jul 12 2014

Keywords

Examples

			86 is in the sequence because 86 = 2* 43, which is semiprime. Also, 86 + (8 + 6) = 100 = 10^2.
614 is in the sequence because 614 = 2* 307, which is semiprime. Also, 614 + (6 + 1 + 4) = 625 = 25^2.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[50000], PrimeOmega[#] == 2 && IntegerQ[Sqrt[# + Apply[Plus, IntegerDigits[#]]]] &]

A050627 Product of digits of n is a nonzero single-digit square.

Original entry on oeis.org

1, 4, 9, 11, 14, 19, 22, 33, 41, 91, 111, 114, 119, 122, 133, 141, 191, 212, 221, 313, 331, 411, 911, 1111, 1114, 1119, 1122, 1133, 1141, 1191, 1212, 1221, 1313, 1331, 1411, 1911, 2112, 2121, 2211, 3113, 3131, 3311, 4111, 9111, 11111, 11114, 11119, 11122, 11133
Offset: 1

Views

Author

Patrick De Geest, Jun 15 1999

Keywords

Comments

I.e., the product of digits is 1, 4, or 9. - Franklin T. Adams-Watters, Sep 27 2016

Crossrefs

Cf. A007954, A028845, A028839, A002275 (a subsequence).

Programs

  • Maple
    f:= proc(d) local R,i;
      R:= [1$d],seq([1$i,4,1$(d-1-i)],i=0..d-1),seq([1$i,9,1$(d-1-i)],i=0..d-1);
      if d >= 2 then R:= R, op(combinat:-permute([1$(d-2),2,2])), op(combinat:-permute([1$(d-2),3,3])) fi;
      op(sort(map(proc(L) local i; add(L[i]*10^(i-1),i=1..d) end proc, [R])))
    end proc:
    map(f, [$1..6]); # Robert Israel, Apr 09 2025
  • Mathematica
    Select[Range[12000],MemberQ[{1,4,9},Times@@IntegerDigits[#]]&] (* Harvey P. Dale, Jan 22 2016 *)

A197129 Numbers such that the sum, sum of the squares, and sum of the cubes of the decimal digits are each a perfect square.

Original entry on oeis.org

1, 4, 9, 10, 40, 90, 100, 400, 900, 1000, 1111, 1224, 1242, 1339, 1393, 1422, 1933, 2124, 2142, 2214, 2241, 2412, 2421, 3139, 3193, 3319, 3391, 3913, 3931, 4000, 4122, 4212, 4221, 4444, 4669, 4696, 4966, 6469, 6496, 6649, 6694, 6946, 6964, 9000, 9133, 9313
Offset: 1

Views

Author

Michel Lagneau, Oct 10 2011

Keywords

Comments

Each number > 90 contains at least two identical digits because the sequence A197125 contains a subset of numbers all of whose digits are distinct and are all the permutations of 1567890. But 1^3 + 5^3 + 6^3 + 7^3 + 8^3 + 9^3 = 1926 is not square. Consequently, it is impossible to find numbers > 90 with distinct digits in this sequence.

Examples

			4669 is in the sequence because:
4   + 6   + 6   + 9   = 25   = 5^2;
4^2 + 6^2 + 6^2 + 9^2 = 169  = 13^2;
4^3 + 6^3 + 6^3 + 9^3 = 1225 = 35^2.
		

Crossrefs

Programs

  • Maple
    for n from 1 to 10000 do:l:=evalf(floor(ilog10(n))+1):n0:=n:s1:=0:s2:=0:s3:=0:for m from 1 to l do:q:=n0:u:=irem(q, 10):v:=iquo(q, 10): n0:=v :s1:=s1+u:s2:=s2+u^2:s3:=s3+u^3:od:if sqrt(s1)=floor(sqrt(s1)) and sqrt(s2)=floor(sqrt(s2)) and sqrt(s3)=floor(sqrt(s3))then printf(`%d, `, n): else fi:od:
  • Mathematica
    sdQ[n_]:=Module[{idn=IntegerDigits[n]},IntegerQ[Sqrt[Total[idn]]] && IntegerQ[Sqrt[Total[idn^2]]]&&IntegerQ[Sqrt[Total[idn^3]]]]; Select[ Range[ 10000],sdQ] (* Harvey P. Dale, Oct 25 2011 *)
    psQ[n_]:=With[{idn=IntegerDigits[n]},AllTrue[{Sqrt[Total[idn]],Sqrt[Total[idn^2]],Sqrt[Total[idn^3]]},IntegerQ]]; Select[Range[10000],psQ] (* Harvey P. Dale, Nov 17 2024 *)
  • PARI
    is(n)=my(v=eval(Vec(Str(n))));issquare(sum(i=1,#v,v[i]))&&issquare(sum(i=1,#v,v[i]^2))&&issquare(sum(i=1,#v,v[i]^3)) \\ Charles R Greathouse IV, Oct 10 2011

Formula

A028839 INTERSECT A175396 INTERSECT A197039.

A333475 Numbers k such that S(2^k) is a perfect square, where S(t) is the sum of decimal digits of t.

Original entry on oeis.org

0, 2, 16, 22, 36, 78, 104, 110, 118, 130, 176, 186, 194, 200, 216, 240, 270, 276, 320, 358, 364, 376, 440, 558, 576, 602, 608, 612, 614, 620, 630, 700, 872, 884, 894, 918, 972, 1144, 1174, 1192, 1216, 1536, 1566, 1610, 1658, 1798, 1882, 2000, 2312, 2630, 2928, 3042, 3540, 3648, 3744, 3750, 3774
Offset: 1

Views

Author

Daniel Starodubtsev, Mar 23 2020

Keywords

Comments

Numbers k such that A000079(k) is in A028839.
All terms are even. - Robert Israel, Mar 24 2020

Examples

			16 is in the sequence, because S(2^16) = S(65536) = 25 is a perfect square.
		

Crossrefs

Programs

  • Maple
    sd:= n -> convert(convert(n,base,10),`+`):
    select(t -> issqr(sd(2^t)), [$0..10000]); # Robert Israel, Mar 24 2020
  • PARI
    isok(k) = issquare(sumdigits(2^k)); \\ Michel Marcus, Mar 23 2020

A354078 Squares k that are not divisible by 10, and whose reverse and digit sum are also squares, such that the digit sum divides both k and its reverse.

Original entry on oeis.org

1, 4, 9, 144, 441, 10404, 12321, 40401, 69696, 1004004, 1022121, 1212201, 4004001, 4088484, 4848804, 100040004, 100220121, 102030201, 121022001, 400040001, 400880484, 404492544, 420578064, 445294404, 460875024, 484088004, 617323716, 10000400004, 10002200121
Offset: 1

Views

Author

Keywords

Comments

Palindromic terms include 12321, 69696, 102030201, 617323716.
144, 10404, 1004004, 100040004, 10000400004, 1000004000004, ... are all terms, so the sequence is infinite.
From Jon E. Schoenfield, May 20 2022: (Start)
Among the 3358 terms < 10^21, several classes of terms are rare or nonexistent:
- no term has an even number of digits
- no term begins or ends with a 5
- no term begins with 18 or 92
- no term that begins with 16 has any digit other than 9 as its third digit
- only one term (420578064) begins with 42, and only one (460875024) begins with 46
- only one term (9488660854689) begins with 94, and only one (9864580668849) begins with 98
- only two terms begin or end with a 6: 69696 and 617323716 (each of which is a palindrome)
- only three terms begin with a 9 and end with anything other than a 1: 9, 9488660854689, and 9864580668849
Do there exist any terms > 10^21 of any of these classes?
(End)

Examples

			10404 and its reverse, 40401 are terms because both are squares,
10404 = 102^2 and 40401 = 201^2, both have digit sum 9 and digit sum divides both 10404 and its reverse. 10404/9 = 1156, and 40401/9 = 4489.
		

Crossrefs

Subsequence of A061457.

Programs

  • C
    int get_digit_sum(int integer, int *reverse)
    {
        int sum = 0;
        int rev_num = 0;
        int num = integer;
        int rem = 0;
        while (num != 0) {
            rem = num % 10;
            sum += rem;
            num = num / 10;
            rev_num = 10*rev_num + rem;
        }
        *reverse = rev_num;
        return sum;
    }
    int is_square(int integer)
    {
        int mid = (int)(sqrt(integer));
        if ((mid*mid) == integer) {
            return mid;
        }
        else {
            return 0;
        }
    }
    int main(int argc, char *argv[])
    {
       int reverse = 0;
       for (int j = 1; j <= 100011; j++) {
           if (j % 10 == 0) {
               continue;
           }
           int i = j*j;
           int digit_sum = get_digit_sum(i, &reverse);
           if ((i % digit_sum == 0) && (reverse % digit_sum == 0) &&
                    (is_square(digit_sum) != 0) && (is_square(reverse) != 0)) {
               printf("%d, ", i);
           }
       }
       printf("\n");
       return 0;
    }
    
  • Magma
    J:=100011; a:=[]; for j in [1..J] do if j mod 10 ne 0 then k:=j^2; I:=Intseq(k); s:=&+I; if (k mod s eq 0) and IsSquare(s) then r:=Seqint(Reverse(I)); if (r mod s eq 0) and IsSquare(r) then a[#a+1]:=k; end if; end if; end if; end for; a; // Jon E. Schoenfield, May 19 2022
  • PARI
    isok1(k) = if (k % 100, my(s=sumdigits(k), q=k/s); issquare(s) && issquare(q) && (denominator(q)==1));
    isok(k) = isok1(k) && isok1(fromdigits(Vecrev(digits(k)))); \\ Michel Marcus, May 17 2022
    

A383745 Numbers k of the form x*(x+1) whose sum of digits is of the form y*(y+1).

Original entry on oeis.org

0, 2, 6, 20, 42, 110, 132, 156, 240, 420, 462, 552, 600, 930, 992, 1056, 1122, 1560, 1722, 1892, 2352, 2550, 2756, 3306, 3540, 3782, 4422, 4556, 4970, 5700, 5852, 6006, 6806, 7140, 7832, 8372, 8930, 9120, 9506, 10100, 10302, 10506, 10920, 11130, 11990, 12210, 12432
Offset: 1

Views

Author

Huaineng He, May 08 2025

Keywords

Comments

4*a(n)+1 is the square of an odd number.
All members are congruent to 0 or 2 mod 3.
The sum of the digits of 10^s * (10^s+1) is 2 so there are infinitely many a(n) of the form 3*m + 2.
The sum of the digits of (10^t-1) * 10^t is 9*t. Given that t = z*(9*z + 1), it can be proved that there are infinitely many a(n) in the form of 3*m.

Examples

			132 is in the sequence because 132 = 11*12 and 1+3+2 = 6 = 2 *3.
2756 is in the sequence because 2756 = 52*53 and 2+7+5+6 = 20 = 4 * 5.
		

Crossrefs

Programs

  • Maple
    select(t -> issqr(1+4*convert(convert(t,base,10),`+`)),[seq(i*(i+1),i=0..120)]); # Robert Israel, Jun 09 2025
  • Mathematica
    Select[2 * Accumulate[Range[0, 150]], IntegerQ[Sqrt[4 * DigitSum[#] + 1]] &] (* Amiram Eldar, May 08 2025 *)
  • PARI
    apply(x->(x*(x+1)), select(x->issquare(4*sumdigits(x*(x+1))+1), [0..100])) \\ Michel Marcus, May 08 2025

Formula

a(n) >= digsum(a(n)).

Extensions

Offset corrected by Robert Israel, Jun 09 2025

A070713 Integers whose sum of digits as well as product of digits is a nonzero square.

Original entry on oeis.org

1, 4, 9, 22, 88, 144, 414, 441, 466, 646, 664, 889, 898, 988, 1111, 1177, 1224, 1242, 1339, 1393, 1422, 1717, 1771, 1933, 2124, 2142, 2214, 2241, 2266, 2338, 2383, 2412, 2421, 2626, 2662, 2833, 3139, 3193, 3238, 3283, 3319, 3328, 3355, 3382, 3391, 3535
Offset: 1

Views

Author

John E. Lenz (jel5010(AT)yahoo.com), May 13 2002

Keywords

Examples

			3931 is a member of this sequence as 3+9+3+1=16=4^2 and 3*9*3*1=81=9^2.
		

Crossrefs

Cf. A028839.

A174274 Each pair of adjacent digits of n sums to a square.

Original entry on oeis.org

10, 13, 18, 22, 27, 31, 36, 40, 45, 54, 63, 72, 79, 81, 88, 90, 97, 100, 101, 104, 109, 131, 136, 181, 188, 222, 227, 272, 279, 310, 313, 318, 363, 400, 401, 404, 409, 454, 540, 545, 631, 636, 722, 727, 790, 797, 810, 813, 818, 881, 888, 900, 901, 904, 909, 972, 979, 1000, 1001, 1004, 1009, 1010, 1013, 1018, 1040, 1045, 1090, 1097, 1310, 1313, 1318, 1363, 1810, 1813, 1818, 1881, 1888
Offset: 1

Views

Author

Zak Seidov, Nov 27 2010

Keywords

Crossrefs

Cf. A028839 Sum of digits of n is a square,
Cf. A061910 (numbers n such that sum of digits of n^2 is a square).

Programs

  • Mathematica
    s={};Do[id=IntegerDigits[n];If[Union[IntegerQ/@Sqrt[Rest[id]+Most[id]]]=={True},AppendTo[s,n]],{n,10,2000}];s
Previous Showing 11-20 of 22 results. Next