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 71-80 of 90 results. Next

A204341 Smith numbers with either no internal digits or all internal digits are 0.

Original entry on oeis.org

4, 22, 27, 58, 85, 94, 202, 706, 8005, 80005, 700006, 800005, 7000000000000006, 80000000000000000005, 80000000000000000000005, 70000000000000000000000000006, 80000000000000000000000000000000000005, 700000000000000000000000000000000000000000000006
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jan 14 2012

Keywords

Comments

All semiprimes of the form 7*10^n + 6 and 8*10^n + 5 are in the sequence.

Crossrefs

Cf. A006753.

Programs

  • Mathematica
    e = 47; Sort[Join[{27}, 2*Select[Flatten[Union[Table[(2*10^n + 2)/2, {n, 0, e}], Table[(a*10^n + 13 - a)/2, {a, {5, 7, 9}}, {n, e}]]], PrimeQ], 5*Select[Table[(8*10^n + 5)/5, {n, e}], PrimeQ]]]

A232541 Multiplicative Smith numbers: Composite numbers n such that the product of nonzero digits of n = product of nonzero digits of prime factors of n.

Original entry on oeis.org

4, 6, 8, 9, 95, 159, 195, 249, 326, 762, 973, 995, 998, 1057, 1086, 1111, 1189, 1236, 1255, 1337, 1338, 1383, 1389, 1395, 1419, 1509, 2139, 2248, 2623, 2679, 2737, 2928, 2949, 3029, 3065, 3202, 3344, 3345, 3419, 3432, 3437, 3464, 3706, 3945, 4344, 4502
Offset: 1

Views

Author

Derek Orr, Nov 25 2013

Keywords

Comments

They follow the same formula for Smith numbers, however, instead of addition, we have multiplication (only nonzero digits are included).
Trivially, prime numbers satisfy this property but are not included in the sequence.

Examples

			1236 is a member of this sequence because 1236 = 2*2*3*103 and 1*2*3*6 = 2*2*3*1*3 (zeros are not included).
998 is a member of this sequence because 998 = 2*499 and 9*9*8 = 2*4*9*9.
		

Crossrefs

Programs

  • Mathematica
    f[n_] := Times @@ DeleteCases[IntegerDigits[n], 0]; pFactors[n_] := Module[{f = FactorInteger[n]}, Flatten[ConstantArray @@@ f]]; Select[Range[2, 10000], ! PrimeQ[#] && f[#] == Times @@ f /@ pFactors[#] &] (* T. D. Noe, Nov 28 2013 *)
    msnQ[n_]:=Times@@(Flatten[IntegerDigits/@Table[#[[1]],#[[2]]]&/@ FactorInteger[ n]]/.(0->1))==Times@@(IntegerDigits[n]/.(0->1)); Select[ Range[ 5000],CompositeQ[#]&&msnQ[#]&] (* Harvey P. Dale, Jan 15 2022 *)
  • Python
    import sympy
    from sympy import isprime
    from sympy import factorint
    def DigitProd(x):
        prod = 1
        for i in str(x):
            if i != '0':
                prod *= int(i)
        return prod
    def f(x):
        lst = []
        for n in range(len(list(factorint(x)))):
            lst.append(str(list(factorint(x))[n])*list(factorint(x).values())[n])
        string = ''
        for i in lst:
            string += i
        prod = 1
        for a in string:
            if a != '0':
                prod *= int(a)
        if prod == DigitProd(x):
            return True
    x = 4
    while x < 10**3:
        if not isprime(x):
            if f(x):
                print(x)
        x += 1
    
  • Sage
    def prodPrimeDig(x):
        F=factor(x)
        T=[item for sublist in [[y[0]]*y[1] for y in F] for item in sublist]
        return prod([prod(filter(lambda a: a!=0,h.digits(base=10))) for h in T])
    n=3345 #Change n for more digits
    [k for k in [1..n] if prod(filter(lambda a: a!=0,k.digits(base=10)))==prodPrimeDig(k) and not(is_prime(k))] # Tom Edgar, Nov 26 2013

Extensions

Extended by T. D. Noe, Nov 28 2013

A274218 Numbers such that the sum of their digits is equal to the sum of digits of their aliquot parts.

Original entry on oeis.org

6, 33, 87, 249, 303, 519, 573, 681, 843, 951, 1059, 1329, 1383, 1923, 1977, 2463, 2733, 2787, 2949, 3057, 3273, 3327, 3543, 3651, 3867, 3921, 4083, 4353, 4677, 5163, 5433, 5703, 5919, 6081, 6243, 6297, 6621, 6891, 7053, 7323, 7377, 7647, 7971, 8079, 8133, 8187
Offset: 1

Views

Author

Paolo P. Lava, Jun 14 2016

Keywords

Examples

			Sum of digits of 8884 is 8 + 8 + 8 + 4 = 28. Its aliquot parts are 1, 2, 4, 2221, 4442 and their sum is 1 + 2 + 4 + 2 + 2 + 2 + 1 + 4 + 4 + 4 + 2 = 28.
		

Crossrefs

Programs

  • Maple
    with(numtheory): T:=proc(w) local x, y, z; x:=w; y:=0; for z from 1 to ilog10(x)+1 do
    y:=y+(x mod 10); x:=trunc(x/10); od; y; end:
    P:=proc(q) local a,k,n; for n from 1 to q do a:=sort([op(divisors(n))]);
    if T(n)=add(T(a[k]),k=1..nops(a)-1) then print(n); fi; od; end: P(10^6);
  • Mathematica
    Select[Range[10^4], Total@ IntegerDigits@ # == Total[Total@ IntegerDigits@ # & /@ Most@ Divisors@ #] &] (* Michael De Vlieger, Jun 14 2016 *)

A279314 Composite numbers n such that the sum of the prime factors of n, with multiplicity, is congruent to n (mod 9).

Original entry on oeis.org

4, 22, 27, 58, 85, 94, 105, 114, 121, 150, 166, 202, 204, 222, 224, 265, 274, 315, 319, 342, 346, 355, 378, 382, 391, 438, 445, 450, 454, 483, 517, 526, 535, 540, 560, 562, 576, 588, 612, 627, 634, 636, 640, 645, 648, 654, 663, 666, 690, 697, 706, 728, 729, 762, 778, 825, 840, 841, 852
Offset: 1

Views

Author

Ely Golden, Dec 09 2016

Keywords

Comments

Supersequence of A006753 (Smith numbers).
Sequence is proven infinite due to the infinitude of the Smith numbers.
Can be generalized for other moduli. Setting the modulus to 1 yields the composite numbers. Setting the modulus to m (m>=2) yields the supersequence which includes the Smith numbers in base (m+1). Of course, m=1 includes all Smith numbers for any base.

Examples

			105 is a member as 105 = 3*5*7 with 105 mod 9 = 6 and (3+5+7) mod 9 = 15 mod 9 = 6.
		

Crossrefs

Cf. A006753.

Programs

  • Mathematica
    Select[Range[4, 860], Function[n, And[CompositeQ@ n, Mod[#, 9] == Mod[n, 9] &@ Total@ Flatten@ Map[ConstantArray[#1, #2] & @@ # &, FactorInteger@ n]]]] (* Michael De Vlieger, Dec 10 2016 *)
    cnnQ[n_]:=CompositeQ[n]&&Mod[Total[Flatten[Table[#[[1]],#[[2]]]&/@ FactorInteger[ n]]],9]==Mod[n,9]; Select[Range[900],cnnQ] (* Requires Mathematica version 10 or later *) (* Harvey P. Dale, Jul 17 2017 *)
  • PARI
    isok(n) = !isprime(n) && (f=factor(n)) && ((n % 9) == (sum(k=1, #f~, f[k,1]*f[k,2]) % 9)); \\ Michel Marcus, Dec 10 2016
  • SageMath
    def factorSum(f):
        s=0
        for c in range(len(f)):
            s+=(f[c][0]*f[c][1])
        return s
    #this variable affects the modulus
    modulus=9
    c=2
    index=1
    while(index<=10000):
        f=list(factor(c))
        if(((len(f)>1)|(f[0][1]>1))&(factorSum(f)%modulus==c%modulus)):
            print(str(index)+" "+str(c))
            index+=1
        c+=1
    print("complete")
    

A308821 Semiprimes where the sum of the digits equals the difference between the prime factors.

Original entry on oeis.org

14, 95, 527, 851, 1247, 3551, 4307, 8051, 14351, 26969, 30227, 37769, 64769, 87953, 152051, 163769, 199553, 202451, 256793, 275369, 341969, 455369, 1070969, 1095953, 1159673, 1232051, 1625369, 1702769, 2005007, 2081993
Offset: 1

Views

Author

James Beyer, Jun 26 2019

Keywords

Comments

14 is the only even number in the sequence, since 2 is the only even prime and p-2 grows much faster than the digit sum of 2p.

Examples

			14=2*7 and 1+4=7-2.
95=5*19 and 9+5=19-5.
527=17*31 and 5+2+7=31-17.
		

Crossrefs

Programs

  • Magma
    [n:n in [2..2100000]|IsSquarefree(n) and #PrimeDivisors(n) eq 2 and PrimeDivisors(n)[2]-PrimeDivisors(n)[1] eq &+Intseq(n)]; // Marius A. Burtea, Jul 27 2019
  • Mathematica
    Take[Sort@ Reap[ Do[ If[PrimeQ[q + g] && g == Total@ IntegerDigits[n = q (q + g)], Sow@n], {g, 9*9}, {q, Prime@ Range@ 2000}]][[2, 1]], 100] (* Giovanni Resta, Jul 25 2019 *)
    spdpfQ[n_]:=Module[{f=FactorInteger[n][[All,1]]},PrimeOmega[n]== 2 && Total[ IntegerDigits[n]]==f[[2]]-f[[1]]]; Select[Range[ 21*10^5],spdpfQ]// Quiet (* or *) Times@@@Select[Subsets[Prime[ Range[ 300]],{2}],#[[2]]-#[[1]]==Total[IntegerDigits[#[[1]]#[[2]]]]&] (* Harvey P. Dale, Oct 14 2021 *)
  • PARI
    isok(n) = (bigomega(n) == 2) && (f=factor(n)) && (#f~ == 2) && (sumdigits(n) == f[2,1] - f[1,1]); \\ Michel Marcus, Jun 29 2019
    

A033663 Least Smith number having digital sum A033662(n).

Original entry on oeis.org

4, 27, 58, 438, 728, 378, 2944, 2576, 588, 778, 5936, 2679, 9880, 2888, 4788, 15778, 16688, 9849, 5998, 9968, 17889, 69856, 26999, 76896, 177688, 167888, 159996, 79978, 487697, 188889, 895696, 777896, 399699, 869896, 1879976, 957999, 779998
Offset: 1

Views

Author

Keywords

Crossrefs

Cf. A006753.

A036922 Even composite numbers whose digit sum equals the digit sum of (sum of prime factors, counted with multiplicity).

Original entry on oeis.org

4, 22, 94, 114, 150, 166, 202, 204, 222, 224, 274, 342, 346, 382, 438, 450, 454, 526, 540, 562, 612, 634, 640, 706, 852, 922, 1068, 1086, 1120, 1122, 1138, 1200, 1230, 1232, 1282, 1314, 1318, 1400, 1626, 1642, 1770, 1820, 1822, 1894, 1966, 2070, 2080
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • PARI
    isok(n)=my(f=factor(n)); n%2==0 && n>2 && sumdigits(sum(i=1, #f~, f[i,1]*f[i,2])) == sumdigits(n) \\ Andrew Howroyd, Jun 19 2021

Extensions

Title reworded by Sean A. Irvine, Nov 30 2020

A036923 Odd composite numbers n such that the digit sum of n equals digit sum of sum of its prime factors (counted with multiplicity).

Original entry on oeis.org

27, 105, 121, 265, 315, 355, 445, 517, 841, 913, 915, 1111, 1165, 1185, 1219, 1221, 1239, 1255, 1345, 1363, 1507, 1633, 1903, 2067, 2101, 2155, 2173, 2209, 2227, 2245, 2265, 2335, 2409, 2515, 2533, 2605, 2965, 3091, 3129, 3219, 3235, 3417, 3505, 3507
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Programs

  • Mathematica
    ds[n_]:=Total[IntegerDigits[n]]; t={}; Do[If[!PrimeQ[n]&&ds[n]==ds[Total[ Times@@@FactorInteger[n]]],AppendTo[t,n]],{n,9,3508,2}]; t (* Jayanta Basu, Jun 04 2013 *)

Extensions

Title reworded by Sean A. Irvine, Nov 30 2020

A036926 Digit sum of 'even' number equals digit sum of 'sum' and 'juxtaposition' of its prime factors (counted with multiplicity).

Original entry on oeis.org

4, 22, 94, 166, 202, 274, 346, 382, 438, 454, 526, 562, 634, 706, 852, 922, 1086, 1282, 1626, 1642, 1822, 1894, 1966, 2182, 2326, 2362, 2434, 2614, 2722, 2902, 2974, 3046, 3138, 3226, 3246, 3258, 3442, 3622, 3694, 3802, 3946, 4054, 4126, 4162, 4306, 4414
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

A036927 Digit sum of 'odd' number equals digit sum of 'sum' and 'juxtaposition' of its prime factors (counted with multiplicity).

Original entry on oeis.org

27, 121, 265, 355, 517, 913, 915, 1111, 1165, 1219, 1255, 1507, 1633, 1903, 2067, 2155, 2173, 2227, 2265, 2409, 2515, 2605, 2965, 3091, 3505, 3615, 3865, 4209, 4765, 4855, 5071, 5305, 6115, 6315, 6457, 7051, 7447, 7465, 7915, 8005, 8023, 9015, 9031
Offset: 1

Views

Author

Patrick De Geest, Jan 04 1999

Keywords

Crossrefs

Previous Showing 71-80 of 90 results. Next