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

A046022 Primes together with 1 and 4.

Original entry on oeis.org

1, 2, 3, 4, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97, 101, 103, 107, 109, 113, 127, 131, 137, 139, 149, 151, 157, 163, 167, 173, 179, 181, 191, 193, 197, 199, 211, 223, 227, 229, 233, 239, 241, 251, 257, 263, 269
Offset: 1

Views

Author

Keywords

Comments

Also the numbers which are incrementally largest values of A002034. - validated by Franklin T. Adams-Watters, Jul 13 2012
Solutions to A000005(x) + A000010(x) - x - 1 = 0. - Labos Elemer, Aug 23 2001
Also numbers m such that m, phi(m) and tau(m) form an integer triangle, where phi=A000010 is the totient and tau=A000005 the number of divisors (see also A084820). - Reinhard Zumkeller, Jun 04 2003
Terms > 1 are n such that n does not divide (n-1)!. - Benoit Cloitre, Nov 12 2003
Terms > 1 are the sum of their prime factors; 4 (= 2+2) is the only such composite number. - Stuart Orford (sjorford(AT)yahoo.co.uk), Aug 04 2005
From Jonathan Vos Post, Aug 23 2010, Robert G. Wilson v, Aug 25 2010, proof by D. S. McNeil, Aug 29 2010: (Start)
Also the numbers n which divide A001414(n), or equivalently divide A075254(n). Proof:
Theorem: for a multiset of m >= 2 integers a_i, each a_i >= 2, Product_{i=1..m} a_i >= Sum_{i=1..m} a_i, with equality only at (a_1,a_2) = (2,2).
Lemma: For integers x,y >= 2, if x > 2 or y > 2, x*y > x + y. This follows from distributing (x-1)*(y-1) > 1.
[Proof of the theorem by induction on m:
first consider m=2. We have equality at (2,2) and for any product(a_i) > 4 there is some a_i > 2, so the lemma gives a_1*a_2 > a_1+a_2.
Then the induction m->m+1: Product_{i=1..m+1} a_i = a_(m+1)*Product_{i=1..m} a_i >= a_(m+1) * Sum_{i=1..m} a_i.
Since a_(m+1) >= 2 and the sum >= 4, the lemma applies, and we find a_(m+1) * Sum+{i=1..m} a_i > a_(m+1) + Sum_{i=1..m} a_i = Sum_{i=1..m+1} a_i and thus Product_{i=1..m+1} a_i > Sum_{i=1..m+1} a_i, QED.]
For composite n > 4, applying the theorem to the multiset of prime factors with multiplicity yields n > sopfr(n), so there are no composite numbers greater than 4 such that they divide sopfr(n).
(End)
Numbers k such that the k-th Fibonacci number is relatively prime to all smaller Fibonacci numbers. - Charles R Greathouse IV, Jul 13 2012
Numbers k such that (-1)^k*floor(d(k)*(-1)^k/2) = 1, where d(k) is the number of divisors of k. - Wesley Ivan Hurt, Oct 11 2013
Also, union of odd primes (A065091) and the divisors of 4. Also, union of A008578 and 4. - Omar E. Pol, Nov 04 2013
Numbers k such that sigma(k!) is divisible by sigma((k-1)!). - Altug Alkan, Jul 18 2016

Crossrefs

Programs

  • Haskell
    a046022 n = a046022_list !! (n-1)
    a046022_list = [1..4] ++ drop 2 a000040_list
    -- Reinhard Zumkeller, Apr 06 2014
    
  • Maple
    A046022:=n-> `if`((-1)^n*floor(numtheory[tau](n)*(-1)^n/2) = 1, n, NULL); seq(A046022(j), j=1..260); # Wesley Ivan Hurt, Oct 11 2013
  • Mathematica
    max = 0; a = {}; Do[m = FactorInteger[n]; w = Sum[m[[k]][[1]]*m[[k]][[2]], {k, 1, Length[m]}]; If[w > max, AppendTo[a, w]; max = w], {n, 1, 1000}]; a (* Artur Jasinski, Apr 06 2008 *)
  • PARI
    a(n)=if(n<6,n,prime(n-2)) \\ Charles R Greathouse IV, Apr 28 2015
    
  • Python
    from sympy import prime
    def A046022(n): return prime(n-2) if n>4 else n # Chai Wah Wu, Oct 17 2024

Formula

A141295(a(n)) = a(n). - Reinhard Zumkeller, Jun 23 2008
A018194(a(n)) = 1. - Reinhard Zumkeller, Mar 09 2012
A240471(a(n)) = 1. - Reinhard Zumkeller, Apr 06 2014

Extensions

Better description from Frank Ellermann, Jun 15 2001

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

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 *)

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

A178156 Numbers m such that (m-1)! is not divisible by m^2.

Original entry on oeis.org

2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 17, 19, 22, 23, 26, 29, 31, 34, 37, 38, 41, 43, 46, 47, 53, 58, 59, 61, 62, 67, 71, 73, 74, 79, 82, 83, 86, 89, 94, 97, 101, 103, 106, 107, 109, 113, 118, 122, 127, 131, 134, 137, 139, 142, 146, 149, 151, 157, 158, 163
Offset: 1

Views

Author

Reinhard Zumkeller, Dec 17 2010

Keywords

Comments

Union of {8, 9} and A001751.

References

  • G. Pólya and G. Szegő, Problems and Theorems in Analysis II (Springer 1924, reprinted 1972), Part Eight, Chap. 3, Sect. 1, Problem 133b.

Crossrefs

Programs

  • Haskell
    import Data.List (insert)
    a178156 n = a178156_list !! (n-1)
    a178156_list = insert 9 $ insert 8 a001751_list
    -- Reinhard Zumkeller, Oct 14 2014
    
  • Mathematica
    Select[Range[200],!Divisible[(#-1)!,#^2]&] (* Harvey P. Dale, Mar 06 2016 *)
  • PARI
    for(m=1,3e2,if((m-1)!%m^2,print1(m", "))) \\ Charles R Greathouse IV, Aug 21 2011
    
  • Python
    from sympy import primepi
    def A178156(n):
        def bisection(f,kmin=0,kmax=1):
            while f(kmax) > kmax: kmax <<= 1
            while kmax-kmin > 1:
                kmid = kmax+kmin>>1
                if f(kmid) <= kmid:
                    kmax = kmid
                else:
                    kmin = kmid
            return kmax
        def f(x): return int(n+x-primepi(x)-primepi(x>>1)-(x>=8)-(x>=9))
        return bisection(f,n,n) # Chai Wah Wu, Oct 17 2024

Extensions

Entries corrected by Charles R Greathouse IV, Aug 21 2011

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
    

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

Original entry on oeis.org

0, 1, 10, 74, 100, 740, 1000, 3488, 7400, 10000, 23658, 30868, 34880, 47508, 48517, 52187, 58947, 59468, 67685, 68058, 74000, 76814, 78368, 78845, 84878, 100000, 108478, 145877, 149217, 163871, 179685, 186884, 188647, 218977, 219878, 236580, 238758, 248967, 278638, 292597, 308680
Offset: 1

Views

Author

Antonio Roldán, Aug 21 2019

Keywords

Comments

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

Examples

			74^3 = 405224, A003132(74) = 7^2 + 4^2 = 65, A003132(405224) = 4^2 + 0^2 + 5^2 + 2^2 + 2^2 + 4^2 = 65.
		

Crossrefs

Programs

  • Magma
    [0] cat [k:k in [1..310000]| &+[c^2: c in Intseq(k)] eq &+[c^2: c in Intseq(k^3)]]; // Marius A. Burtea, Aug 26 2019
  • Mathematica
    digSum[n_] := Total[IntegerDigits[n]^2]; Select[Range[0, 310000], digSum[#] == digSum[#^3] &] (* Amiram Eldar, Aug 22 2019 *)
  • PARI
    for(i = 0, 400000, if(norml2(digits(i^3)) == norml2(digits(i)), print1(i, ", ")))
    
Showing 1-8 of 8 results.