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

A178203 Smith numbers of order 5; composite numbers n such that sum of digits^5 equal sum of digits^5 of its prime factors without the numbers in A176670 that have the same digits as its prime factors (without the zero digits).

Original entry on oeis.org

414966, 443166, 454266, 1274664, 1371372, 1701856, 1713732, 1734616, 1771248, 1858436, 1858616, 2075664, 2624976, 3606691, 3771031, 3771301, 4266914, 4414866, 4461786, 4605146, 4670576, 4710739, 5209663, 5281767, 5434572, 5836565, 5861712, 5871968, 6046357
Offset: 1

Views

Author

Paul Weisenhorn, Dec 19 2010

Keywords

Examples

			a(10) = 1858436 = 2*2*29*37*433;
1^5 + 3^5 + 4^5 + 5^5 + 6^5 + 2*8^5 = 3*2^5 + 3*3^5 + 4^5 + 7^5 + 9^5 = 77705.
		

Crossrefs

Cf. A006753 (Smith numbers), A176670, A174460, A178213, A178193, A178204.

Extensions

a(21) corrected by Donovan Johnson, Jan 02 2013

A178204 Smith numbers of order 6; composite numbers n such that sum of digits^6 equal sum of digits^6 of its prime factors without the numbers in A176670 that have the same digits as its prime factors (without the zero digits).

Original entry on oeis.org

40844882, 113986781, 130852098, 141176320, 168137185, 170774472, 178180163, 181681157, 181693781, 183161897, 187117638, 215149451, 261666000, 284804842, 294557945, 307711074, 335524949, 337194240, 344552927, 347391040, 355318188, 358831104, 368657536
Offset: 1

Views

Author

Paul Weisenhorn, Dec 19 2010

Keywords

Examples

			a(4) = 141176320 = 2^9*5*55147;
3*1^6+2^6+3^6+4^6+6^6+7^6 = 1^6+9*2^6+4^6+3*5^6+7^6 = 169197
		

Crossrefs

Cf. A006753 (Smith numbers), A176670, A174460, A178213, A178193, A178203.

Programs

  • Mathematica
    fQ[n_] := Block[{id = Sort@ IntegerDigits@ n, fid = Sort@ Flatten[ IntegerDigits@ Table[ #[[1]], {#[[2]]}] & /@ FactorInteger@ n]}, While[ id[[1]] == 0, id = Drop[id, 1]]; While[ fid[[1]] == 0, fid = Drop[fid, 1]]; id != fid && Plus @@ (id^6) == Plus @@ (fid^6)]; k = 2; lst = {}; While[k < 50000001, If[fQ@ k, AppendTo[ lst, k]; Print@ k]; k++]; lst

Extensions

Example corrected by Donovan Johnson, Jan 02 2013

A178193 Smith numbers of order 4.

Original entry on oeis.org

3777, 7773, 17418, 30777, 53921, 66111, 97731, 111916, 119217, 122519, 128131, 133195, 135488, 138878, 145229, 178814, 180174, 198581, 257376, 269636, 281179, 296396, 317686, 358256, 362996, 366514, 394114, 435777, 457377, 469552, 475856, 502960, 513833
Offset: 1

Views

Author

Paul Weisenhorn, Dec 19 2010

Keywords

Comments

Composite numbers n not in A176670 such that the sum of the 4th power of the digits of n equals the sum of the 4th power of the digits of the prime factors of n (with multiplicity). A176670 lists composite numbers having the same digits as their prime factors (with multiplicity), excluding zero digits.

Examples

			3777 = 3*1259 is composite; sum of 4th power of the digits is 3^4 + 7^4 + 7^4 + 7^4 = 7284. Sum of 4th power of the digits of the prime factors 3, 1259 is 3^4 + 1^4 + 2^4 + 5^4 + 9^4 = 7284. The sums are equal, so 3777 is in the sequence.
17418 = 2*3*2903 is composite; sum of 4th power of the digits is 1^4 + 7^4 + 4^4 + 1^4 + 8^4 = 6755. Sum of 4th power of the digits of the prime factors 2, 3, 2903 is 2^4 + 3^4 + 2^4 + 9^4 + 0^4 + 3^4 = 6755. The sums are equal, so 17418 is in the sequence.
269636 = 2*2*67409 is composite; sum of 4th power of the digits is 2^4 + 6^4 + 9^4 + 6^4 + 3^4 + 6^4 = 10546. Sum of 4th power of the digits of the prime factors 2, 2, 67409 (with multiplicity) is 2^4 + 2^4 + 6^4 + 7^4 + 4^4 + 0^4 + 9^4 = 10546. The sums are equal, so 269636 is in the sequence.
		

Crossrefs

Cf. A006753 (Smith numbers), A176670, A174460, A178213, A178203, A178204.

Programs

  • Mathematica
    fQ[n_] := Block[{id = Sort@ IntegerDigits@ n, fid = Sort@ Flatten[ IntegerDigits@ Table[#[[1]], {#[[2]]}] & /@ FactorInteger@ n]}, While[ id[[1]] == 0, id = Drop[id, 1]]; While[ fid[[1]] == 0, fid = Drop[fid, 1]]; id != fid && Plus @@ (id^4) == Plus @@ (fid^4)]; k = 1; lst = {}; While[k < 10^6, If[f Q@ k, AppendTo[lst, k]; Print@ k]; k++]; lst

A278909 Binary Smith numbers: composite numbers n such that sum of bits of n = sum of bits of prime factors of n (counted with multiplicity).

Original entry on oeis.org

15, 51, 55, 85, 125, 159, 185, 190, 205, 215, 222, 238, 246, 249, 253, 287, 303, 319, 374, 407, 438, 442, 469, 471, 475, 489, 494, 501, 507, 591, 623, 639, 670, 679, 687, 699, 730, 745, 755, 763, 765, 771, 799, 807, 822, 830, 843, 867, 890, 893, 917, 923, 925, 935, 939, 951, 970, 973, 979, 986, 989, 995, 1010, 1015, 1017, 1020, 1023, 1135, 1167, 1203, 1243
Offset: 1

Views

Author

Ely Golden, Nov 30 2016

Keywords

Comments

Binary equivalent of A006753 as well as A176670. (Since bits can only be 0 or 1, having equal sums of bits is logically equivalent to having the same nonzero bits.)
There are 615 terms up to 10^4, 6412 up to 10^5, 66369 up to 10^6, 630106 up to 10^7, 6268949 up to 10^8, 62159262 up to 10^9, and 596587090 up to 10^10. - Charles R Greathouse IV, Dec 09 2016

Examples

			a(1) = 15, as 15 (1111) in binary has the same number of 1 bits as its prime factors (11 and 101).
		

Crossrefs

Programs

  • Mathematica
    Select[Range@ 1250, And[CompositeQ@ #, DigitCount[#, 2, 1] = Total@ Flatten@ Apply[DigitCount[#, 2, 1] & /@ ConstantArray[#1, #2] &, FactorInteger@ #, 1]] &] (* Michael De Vlieger, Dec 02 2016 *)
  • PARI
    is(n) = my(f=factor(n)[, 1]~, expo=factor(n)[, 2]~, v=[], s=0); for(k=1, #f, while(expo[k] > 0, expo[k]--; v=concat(v, f[k]))); for(k=1, #v, v[k]=binary(v[k])); my(w=[]); for(y=1, #v, w=concat(w, v[y])); if(vecsum(w)==vecsum(binary(n)), return(1), return(0))
    terms(n) = my(i=0); forcomposite(c=1, , if(is(c), print1(c, ", "); i++; if(i==n, break)))
    /* Print initial 70 terms as follows: */
    terms(70) \\ Felix Fröhlich, Dec 01 2016
    
  • PARI
    is(n)=my(f=factor(n),t=#f~); (t>1 || (t==1 && f[1,2]>1)) && hammingweight(n)==sum(i=1,t, hammingweight(f[i,1])*f[i,2]) \\ Charles R Greathouse IV, Dec 02 2016
    
  • Python
    from sympy import factorint
    def sbd(n): return bin(n).count('1')
    def ok(n):
      f = factorint(n)
      return sum(f[p] for p in f) > 1 and sbd(n) == sum(sbd(p)*f[p] for p in f)
    print(list(filter(ok, range(1244)))) # Michael S. Branicky, Apr 22 2021
  • SageMath
    def numfactorbits(x):
        if(x<2):
            return 0;
        s=0;
        f=list(factor(x));
        #ensures inequality of numfactorbits(x) and bin(x).count("1") if x is prime
        if((len(f)==1)&(f[0][1]==1)):
            return 0;
        for c in range(len(f)):
            s+=bin(f[c][0]).count("1")*f[c][1]
        return s;
    counter=2
    index=1
    while(index<=10000):
        if(numfactorbits(counter)==bin(counter).count("1")):
            print(str(index)+" "+str(counter))
            index+=1;
        counter+=1;
    

A280928 Composite numbers having the same digits as their prime factors (with multiplicity), including zero digits.

Original entry on oeis.org

1255, 12955, 17482, 25105, 100255, 101299, 105295, 107329, 117067, 124483, 127417, 129595, 132565, 145273, 146137, 149782, 163797, 174082, 174298, 174793, 174982, 250105, 256315, 263155, 295105, 297463, 307183, 325615, 371893, 536539, 687919, 1002955, 1004251, 1012099, 1025095, 1029955
Offset: 1

Views

Author

Ely Golden, Jan 11 2017

Keywords

Comments

Subsequence of A176670 as well as A020342.
Is this sequence the intersection of A176670 and A020342?
Excluding 1, all members of A080718 are members of this sequence. The first member of this sequence that is not a member of A080718 is a(17)=163797.

Examples

			100255 is a member of this sequence as 100255 = 5*20051, which is exactly the same set of digits as 100255.
		

Crossrefs

The following sequences are all closely related: A020342, A014575, A080718, A280928, A048936, A144563.

Programs

  • Python
    from sympy import factorint
    def ok(n):
        f = factorint(n)
        return sum(f.values()) > 1 and sorted(str(n)) == sorted("".join(str(p)*f[p] for p in f))
    print([k for k in range(700000) if ok(k)]) # Michael S. Branicky, Apr 20 2025
  • SageMath
    def digits(x, n):
        if((x<=0)|(n<2)):
            return []
        li=[]
        while(x>0):
            d=divmod(x, n)
            li.append(d[1])
            x=d[0]
        li.sort()
        return li;
    def factorDigits(x, n):
        if((x<=0)|(n<2)):
            return []
        li=[]
        f=list(factor(x))
        #ensures inequality of digits(x, n) and factorDigits(x, n) if x is prime
        if((len(f)==1)&(f[0][1]==1)):
            return [];
        for c in range(len(f)):
            for d in range(f[c][1]):
                ld=digits(f[c][0], n)
                li+=ld
        li.sort()
        return li;
    #this variable affects the radix
    radix=10
    c=2
    index=1
    while(index<=100):
        if(digits(c,radix)==factorDigits(c,radix)):
            print(str(index)+" "+str(c))
            index+=1
        c+=1
    print("complete")
    

A174460 Smith numbers of order 2.

Original entry on oeis.org

56, 58, 810, 822, 1075, 1519, 1752, 2145, 2227, 2260, 2483, 2618, 2620, 3078, 3576, 3653, 3962, 4336, 4823, 4974, 5216, 5242, 5386, 5636, 5719, 5762, 5935, 5998, 6220, 6424, 6622, 6845, 7015, 7251, 7339, 7705, 7756, 8460, 9254, 9303, 9355, 10481, 10626, 10659
Offset: 1

Views

Author

Paul Weisenhorn, Dec 20 2010

Keywords

Comments

Composite numbers a(n) such that the sum of digits^2 equals the sum of digits^2 of its prime factors without the numbers of A176670 that have the same digits as its prime factors (without the zero digit).
It seems as though as the order n approaches infinity, the sequence of n-order Smith numbers approaches A176670. Is there a value of n where the only n-order Smith numbers are members of A176670? - Ely Golden, Dec 07 2016

Examples

			a(2) = 58 = 2*29 is a Smith number of order 2 because 5^2 + 8^2 = 2^2 + 2^2 + 9^2 = 89.
		

Crossrefs

Cf. A006753 (Smith numbers), A176670, A178213, A178193, A178203, A178204.

Programs

  • Maple
    for s from 2 to 10000 do g:=nops(ifactors(s)[2]): qsp:=0: for u from 1 to g do z:=ifactors(s)[2,u][1]: h:=0: while (z>0) do z:=iquo(z,10,'r'): h:=h+r^2: end do: h:=h*ifactors(s)[2,u][2]: qsp:=qsp+h: end do: z:=s: qs:=0: while (z>0) do z:=iquo(z,10,'r'): qs:=qs+r^2: end do: if (qsp=qs) then print(s): end if: end do:
  • Mathematica
    With[{k = 2},Select[Range[12000], Function[n, And[Total@ Map[#^k &, IntegerDigits@ n] == Total@ Map[#^k &, Flatten@ IntegerDigits[#]], Not[Sort@ DeleteCases[#, 0] &@ IntegerDigits@ n == Sort@ DeleteCases[#, 0] &@ #]] &@ Flatten@ Map[IntegerDigits@ ConstantArray[#1, #2] & @@ # &, FactorInteger@ n]]]] (* Michael De Vlieger, Dec 10 2016 *)

A178213 Smith numbers of order 3.

Original entry on oeis.org

6606, 8540, 13086, 16866, 21080, 26637, 27468, 33387, 34790, 35364, 35377, 40908, 44652, 48154, 48860, 52798, 54814, 55055, 57726, 57894, 66438, 67297, 67356, 67594, 69549, 72465, 72598, 73026, 74371, 74785, 77485, 78745, 81546, 83175, 85927, 90174, 91208
Offset: 1

Views

Author

Paul Weisenhorn, Dec 19 2010

Keywords

Comments

Composite numbers n not in A176670 such that the sum of the cubes of the digits of n equals the sum of the cubes of the digits of the prime factors of n (with multiplicity). A176670 lists composite numbers having the same digits as their prime factors (with multiplicity), excluding zero digits.

Examples

			6606 = 2*3*3*367 is composite; sum of cubes of the digits is 6^3+6^3+0^3+6^3 = 648. Sum of cubes of the digits of the prime factors 2, 3, 3, 367 (with multiplicity) is 2^3+3^3+3^3+3^3+6^3+7^3 = 648. The sums are equal, so 6606 is in the sequence.
21080 = 2*2*2*5*17*31 is composite; sum of cubes of the digits is 2^3+1^3+0^3+8^3+0^3 = 521. Sum of cubes of the digits of the prime factors 2, 2, 2, 5, 17, 31 (with multiplicity) is 2^3+2^3+2^3+5^3+1^3+7^3+3^3+1^3 = 521. The sums are equal, so 21080 is in the sequence.
		

Crossrefs

Cf. A006753 (Smith numbers), A174460, A176670, A178193, A178203, A178204.

Programs

  • Mathematica
    fQ[n_] := Block[{id = Sort@ IntegerDigits@ n, fid = Sort@ Flatten[ IntegerDigits@ Table[ #[[1]], {#[[2]]}] & /@ FactorInteger@ n]}, While[ id[[1]] == 0, id = Drop[id, 1]]; While[ fid[[1]] == 0, fid = Drop[fid, 1]]; !PrimeQ@ n && id != fid && Plus @@ (id^3) == Plus @@ (fid^3)]; k = 2; lst = {}; While[k < 22002, If[fQ@ k, AppendTo[ lst, k]; Print@ k]; k++]; lst
    With[{k = 3}, Select[Range[10^5], Function[n, And[Total@ Map[#^k &, IntegerDigits@ n] == Total@ Map[#^k &, Flatten@ IntegerDigits[#]], Not[Sort@ DeleteCases[#, 0] &@ IntegerDigits@ n == Sort@ DeleteCases[#, 0] &@#]] &@ Flatten@ Map[IntegerDigits@ ConstantArray[#1, #2] & @@ # &, FactorInteger@ n]]]] (* Michael De Vlieger, Dec 10 2016 *)

A278981 a(n) is the first composite number having the same base-n digits as its prime factors (with multiplicity), excluding zero digits (or 0 if no such composite number exists).

Original entry on oeis.org

15, 399, 85, 318, 57, 906, 85, 1670, 1111, 18193, 185, 7205205, 4119, 63791, 4369, 1548502, 489, 258099, 451, 408166, 13315, 1012985, 679, 25841526, 26533, 2884373, 985, 49101338, 1057, 5362755, 1285, 2447558, 179503, 3091422, 1387, 5830693854, 82311, 149338, 2005
Offset: 2

Views

Author

Ely Golden, Dec 02 2016

Keywords

Comments

For an alternate program that only checks a single base at a time, use the code from "#the actual function (alternate)" instead of "#the actual function".
The computation of a(n) is exceedingly inefficient, requiring the checking of all natural values less than a(n). A more efficient way to compute a(n) is very desirable. - Ely Golden, Dec 25 2016
There is a lower bound on a(n), if not 0, of n^2 + n + 1. As well, a(n) must have 3 or more nonzero digits in base n (if n is odd, this lower bound is n^3 + n^2 + n + 1, and a(n) must have 4 or more nonzero digits in base n). This does not significantly improve the computation of a(n), however. - Ely Golden, Dec 30 2016
The pattern in the magnitude of a(n) is unclear. For some values of n, a(n) is much larger than for other values. For example, a(65) is 2460678262, whereas a(64) is only 4369 and a(66) is 4577. It seems as though even values of n typically have smaller values of a(n). - Ely Golden, Dec 30 2016
It is known that a(n) > 0 for any nonzero member of this sequence, as well as any n >= 2 of the form A280270(m), A070689(m), A279480(m), 2*A089001(m), 2*A115104(m), and 2*A280273(m)-1. It is likely, but not known, that a(n) > 0 for all n >= 2. - Ely Golden, Dec 30 2016

Examples

			a(2) = 15, as 15 is the first composite number whose base-2 nonzero digits (1111) are the same as the base-2 nonzero digits of its prime factors (11_2 and 101_2).
		

Crossrefs

a(10) = A176670(1); a(2) = A278909(1).

Programs

  • Mathematica
    g[n_] := g[n] = Flatten[ Table[#[[1]], {#[[2]]}] & /@ FactorInteger[n]];
    f[b_] := Block[{c = b^2}, While[ PrimeQ@ c || DeleteCases[ Sort[ IntegerDigits[c, b]], 0] != DeleteCases[ Sort[ Flatten[ IntegerDigits[g[c], b]]], 0], c++]; c]; Array[f, 39, 2] (* Robert G. Wilson v, Dec 30 2016 *)
  • SageMath
    def nonZeroDigits(x,n):
        if(x<=0|n<2):
            return []
        li=[]
        while(x>0):
            d=divmod(x,n)
            if(d[1]!=0):
                li.append(d[1])
            x=d[0]
        li.sort()
        return li;
    def nonZeroFactorDigits(x,n):
        if(x<=0|n<2):
            return []
        li=[]
        f=list(factor(x))
        #ensures inequality of nonZeroFactorDigits(x,n) and nonZeroDigits(x,n) if x is prime
        if((len(f)==1)&(f[0][1]==1)):
            return [];
        for c in range(len(f)):
            for d in range(f[c][1]):
                ld=nonZeroDigits(f[c][0],n)
                li+=ld
        li.sort()
        return li;
    #the actual function
    def a(n):
        c=2
        while(nonZeroFactorDigits(c,n)!=nonZeroDigits(c,n)):
            c+=1;
        return c;
    index=2
    while(index<=100):
        print(str(index)+" "+str(a(index)))
        index+=1
    print("complete")
    #the actual function (alternate)
    def a(n):
        c=2
        while(nonZeroFactorDigits(c,n)!=nonZeroDigits(c,n)):
            c+=1;
            if(c%1000000==1):
                print("checked up to "+str(c-1))
        return c;
    x=3 # 
    print(str(x)+" "+str(a(x)))
    print("complete")

A280972 Numbers that appear in both A278909 and A280967 but not in A280971.

Original entry on oeis.org

765, 1275, 1467, 1503, 1515, 1695, 2910, 2975, 3066, 3423, 4335, 4539, 4605, 4862, 4923, 4947, 4975, 5110, 5295, 5335, 5375, 5559, 5787, 5790, 5835, 5885, 6069, 6123, 6495, 6735, 6783, 7035, 7134, 9195, 9567, 9583, 9645, 9819, 9915, 10087, 10155, 10218, 10234, 10491, 10686, 10959, 10983, 11211
Offset: 1

Views

Author

Ely Golden, Jan 11 2017

Keywords

Comments

Binary equivalent of the sequence representing Numbers that appear in both A176670 and A020342 but not A280928 (currently no members are known).

Examples

			765 = A278909(41) = A280967(32) but is not present in A280971.
		

Crossrefs

A309883 Numbers k such that A003132(k^2) = A003132(k), where A003132(n) is the sum of the squares of the digits of n.

Original entry on oeis.org

0, 1, 10, 35, 100, 152, 350, 377, 452, 539, 709, 1000, 1299, 1398, 1439, 1519, 1520, 1569, 1591, 1679, 1965, 2599, 2838, 3332, 3500, 3598, 3770, 4520, 4586, 4754, 4854, 5390, 5501, 5835, 5857, 6388, 6595, 6735, 6861, 6951, 7090, 7349, 7887, 8395, 9795, 10000, 10056, 10159, 10389, 11055, 11091, 12990, 12999
Offset: 1

Views

Author

Antonio Roldán, Aug 21 2019

Keywords

Comments

If k is in the sequence, then so are k*10^r, r >= 1.

Examples

			377^2 = 142129, A003132(377) = 3^2 + 7^2 + 7^2 = 107, A003132(142129) = 1^2 + 4^2 + 2^2 + 1^2 + 2^2 + 9^2 = 107.
		

Crossrefs

Programs

  • Magma
    [0] cat [k:k in [1..13000]| &+[c^2: c in Intseq(k)] eq &+[c^2: c in Intseq(k^2)]]; // Marius A. Burtea, Aug 24 2019
  • Maple
    filter:= proc(n) local t;
      add(t^2, t = convert(n,base,10)) = add(t^2, t = convert(n^2,base,10))
    end proc:
    select(filter, [$0..20000]); # Robert Israel, Apr 30 2023
  • Mathematica
    digSum[n_] := Total[IntegerDigits[n]^2]; Select[Range[0, 13000], digSum[#] == digSum[#^2] &] (* Amiram Eldar, Aug 22 2019 *)
  • PARI
    for(i = 0, 30000, if(norml2(digits(i^2)) == norml2(digits(i)), print1(i, ", ")))
    
  • Python
    def A003132(n):
        s = 0
        while n > 0:
            s, n = s+(n%10)**2, n//10
        return s
    n, a = 0, 0
    while n < 50:
        if A003132(a) == A003132(a*a):
            n = n+1
            print(n,a)
        a = a+1 # A.H.M. Smeets, Aug 23 2019
    
Showing 1-10 of 11 results. Next