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

A143204 Union of A143207 and A033847.

Original entry on oeis.org

14, 28, 30, 56, 60, 90, 98, 112, 120, 150, 180, 196, 224, 240, 270, 300, 360, 392, 448, 450, 480, 540, 600, 686, 720, 750, 784, 810, 896, 900, 960, 1080, 1200, 1350, 1372, 1440, 1500, 1568, 1620, 1792, 1800, 1920, 2160, 2250, 2400, 2430, 2700, 2744, 2880
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 12 2008

Keywords

Comments

Subsequence of A195238. - Harvey P. Dale, Sep 13 2011

Examples

			a(1)  =  14 = 2 * 7 = A033847(1).
a(2)  =  28 = 2^2 * 7 = A033847(2).
a(3)  =  30 = 2 * 3 * 5 = A143207(1).
a(4)  =  56 = 2^3 * 7 = A033847(3).
a(5)  =  60 = 2^2 * 3 * 5 = A143207(2).
a(6)  =  90 = 2 * 3^2 * 5 = A143207(3).
a(7)  =  98 = 2 * 7^2 = A033847(4).
a(8)  = 112 = 2^4 * 7 = A033847(5).
a(9)  = 120 = 2^3 * 3 * 5 = A143207(4).
a(10) = 150 = 2 * 3 * 5^2 = A143207(5).
a(11) = 180 = 2^2 * 3^2 * 5 = A143207(6).
a(12) = 196 = 2^2 * 7^2 = A033847(6).
		

Crossrefs

Programs

  • Mathematica
    q[n_] := Module[{p1 = {2, 3, 5}, p2 = {2, 7}, e1, e2}, e1 = IntegerExponent[n, p1]; e2 = IntegerExponent[n, p2]; (Times @@ e1 > 0 && Times @@ (p1^e1) == n) || (Times @@ e2 > 0 && Times @@ (p2^e2) == n)]; Select[Range[3000], q] (* Amiram Eldar, Oct 25 2024 *)

Formula

A143201(a(n)) = 6. - Harvey P. Dale, Sep 13 2011
Sum_{n>=1} 1/a(n) = 7/24. - Amiram Eldar, Oct 25 2024

Extensions

Corrected by Harvey P. Dale, Aug 21 2011
Revised version with improved definition; thanks to Harvey P. Dale, who noticed that the original definition was not sufficient.

A008472 Sum of the distinct primes dividing n.

Original entry on oeis.org

0, 2, 3, 2, 5, 5, 7, 2, 3, 7, 11, 5, 13, 9, 8, 2, 17, 5, 19, 7, 10, 13, 23, 5, 5, 15, 3, 9, 29, 10, 31, 2, 14, 19, 12, 5, 37, 21, 16, 7, 41, 12, 43, 13, 8, 25, 47, 5, 7, 7, 20, 15, 53, 5, 16, 9, 22, 31, 59, 10, 61, 33, 10, 2, 18, 16, 67, 19, 26, 14, 71, 5, 73
Offset: 1

Views

Author

Keywords

Comments

Sometimes called sopf(n).
Sum of primes dividing n (without repetition) (compare A001414).
Equals A051731 * A061397 = inverse Mobius transform of [0, 2, 3, 0, 5, 0, 7, ...]. - Gary W. Adamson, Feb 14 2008
Equals row sums of triangle A143535. - Gary W. Adamson, Aug 23 2008
a(n) = n if and only if n is prime. - Daniel Forgues, Mar 24 2009
a(n) = n is a new record if and only if n is prime. - Zak Seidov, Jun 27 2009
a(A001043(n)) = A191583(n);
For n > 0: a(A000079(n)) = 2, a(A000244(n)) = 3, a(A000351(n)) = 5, a(A000420(n)) = 7;
a(A006899(n)) <= 3; a(A003586(n)) = 5; a(A033846(n)) = 7; a(A033849(n)) = 8; a(A033847(n)) = 9; a(A033850(n)) = 10; a(A143207(n)) = 10. - Reinhard Zumkeller, Jun 28 2011
For n > 1: a(n) = Sum(A027748(n,k): 1 <= k <= A001221(n)). - Reinhard Zumkeller, Aug 27 2011
If n is the product of twin primes (A037074), a(n) = 2*sqrt(n+1) = sqrt(4n+4). - Wesley Ivan Hurt, Sep 07 2013
From Wilf A. Wilson, Jul 21 2017: (Start)
a(n) + 2, n > 2, is the number of maximal subsemigroups of the monoid of orientation-preserving or -reversing mappings on a set with n elements.
a(n) + 3, n > 2, is the number of maximal subsemigroups of the monoid of orientation-preserving or -reversing partial mappings on a set with n elements.
(End)
The smallest m such that a(m) = n, or 0 if no such number m exists is A064502(n). The only integers that are not in the sequence are 1, 4 and 6. - Bernard Schott, Feb 07 2022

Examples

			a(18) = 5 because 18 = 2 * 3^2 and 2 + 3 = 5.
a(19) = 19 because 19 is prime.
a(20) = 7 because 20 = 2^2 * 5 and 2 + 5 = 7.
		

Crossrefs

First difference of A024924.
Sum of the k-th powers of the primes dividing n for k=0..10 : A001221 (k=0), this sequence (k=1), A005063 (k=2), A005064 (k=3), A005065 (k=4), A351193 (k=5), A351194 (k=6), A351195 (k=7), this sequence (k=8), A351197 (k=9), A351198 (k=10).
Cf. A010051.

Programs

  • Haskell
    a008472 = sum . a027748_row  -- Reinhard Zumkeller, Mar 29 2012
    
  • Magma
    [n eq 1 select 0 else &+[p[1]: p in Factorization(n)]: n in [1..100]]; // Vincenzo Librandi, Jun 24 2017
    
  • Maple
    A008472 := n -> add(d, d = select(isprime, numtheory[divisors](n))):
    seq(A008472(i), i = 1..40); # Peter Luschny, Jan 31 2012
    A008472 := proc(n)
            add( d, d= numtheory[factorset](n)) ;
    end proc: # R. J. Mathar, Jul 08 2012
  • Mathematica
    Prepend[Array[Plus @@ First[Transpose[FactorInteger[#]]] &, 100, 2], 0]
    Join[{0}, Rest[Total[Transpose[FactorInteger[#]][[1]]]&/@Range[100]]] (* Harvey P. Dale, Jun 18 2012 *)
    (* Requires version 7.0+ *) Table[DivisorSum[n, # &, PrimeQ[#] &], {n, 75}] (* Alonso del Arte, Dec 13 2014 *)
    Table[Sum[p, {p, Select[Divisors[n], PrimeQ]}], {n, 1, 100}] (* Vaclav Kotesovec, May 20 2020 *)
  • PARI
    sopf(n) = local(fac=factor(n)); sum(i=1,matsize(fac)[1],fac[i,1])
    
  • PARI
    vector(100,n,vecsum(factor(n)[,1]~)) \\ Derek Orr, May 13 2015
    
  • PARI
    A008472(n)=vecsum(factor(n)[,1]) \\ M. F. Hasler, Jul 18 2015
    
  • Python
    from sympy import primefactors
    def A008472(n): return sum(primefactors(n)) # Chai Wah Wu, Feb 03 2022
  • Sage
    def A008472(n):
        return add(d for d in divisors(n) if is_prime(d))
    print([A008472(i) for i in (1..40)]) # Peter Luschny, Jan 31 2012
    
  • Sage
    [sum(prime_factors(n)) for n in range(1,74)] # Giuseppe Coppoletta, Jan 19 2015
    

Formula

Let n = Product_j prime(j)^k(j) where k(j) >= 1, then a(n) = Sum_j prime(j).
Additive with a(p^e) = p.
G.f.: Sum_{k >= 1} prime(k)*x^prime(k)/(1-x^prime(k)). - Franklin T. Adams-Watters, Sep 01 2009
L.g.f.: -log(Product_{k>=1} (1 - x^prime(k))) = Sum_{n>=1} a(n)*x^n/n. - Ilya Gutkovskiy, May 06 2017
Dirichlet g.f.: primezeta(s-1)*zeta(s). - Benedict W. J. Irwin, Jul 11 2018
a(n) = Sum_{p|n, p prime} p. - Wesley Ivan Hurt, Feb 04 2022
From Bernard Schott, Feb 07 2022: (Start)
For n > 0: a(A001020(n)) = 11, a(A001022(n)) = 13, a(A001026(n)) = 17, a(A001029(n)) = 19, a(A009967(n)) = 23, a(A009973(n)) = 29, a(A009975(n)) = 31, a(A009981(n)) = 37, a(A009985(n)) = 41, a(A009987(n)) = 43, a(A009991(n)) = 47.
For p odd prime, a(2*p) = p+2 <==> a(A100484(n)) = A052147(n) for n > 1. (End)
a(n) = Sum_{d|n} d * c(d), where c = A010051. - Wesley Ivan Hurt, Jun 22 2024

A087207 A binary representation of the primes that divide a number, shown in decimal.

Original entry on oeis.org

0, 1, 2, 1, 4, 3, 8, 1, 2, 5, 16, 3, 32, 9, 6, 1, 64, 3, 128, 5, 10, 17, 256, 3, 4, 33, 2, 9, 512, 7, 1024, 1, 18, 65, 12, 3, 2048, 129, 34, 5, 4096, 11, 8192, 17, 6, 257, 16384, 3, 8, 5, 66, 33, 32768, 3, 20, 9, 130, 513, 65536, 7, 131072, 1025, 10, 1, 36, 19, 262144, 65, 258
Offset: 1

Views

Author

Mitch Cervinka (puritan(AT)planetkc.com), Oct 26 2003

Keywords

Comments

The binary representation of a(n) shows which prime numbers divide n, but not the multiplicities. a(2)=1, a(3)=10, a(4)=1, a(5)=100, a(6)=11, a(10)=101, a(30)=111, etc.
For n > 1, a(n) gives the (one-based) index of the column where n is located in array A285321. A008479 gives the other index. - Antti Karttunen, Apr 17 2017
From Antti Karttunen, Jun 18 & 20 2017: (Start)
A268335 gives all n such that a(n) = A248663(n); the squarefree numbers (A005117) are all the n such that a(n) = A285330(n) = A048675(n).
For all n > 1 for which the value of A285331(n) is well-defined, we have A285331(a(n)) <= floor(A285331(n)/2), because then n is included in the binary tree A285332 and a(n) is one of its ancestors (in that tree), and thus must be at least one step nearer to its root than n itself.
Conjecture: Starting at any n and iterating the map n -> a(n), we will always reach 0 (see A288569). This conjecture is equivalent to the conjecture that at any n that is neither a prime nor a power of two, we will eventually hit a prime number (which then becomes a power of two in the next iteration). If this conjecture is false then sequence A285332 cannot be a permutation of natural numbers. On the other hand, if the conjecture is true, then A285332 must be a permutation of natural numbers, because all primes and powers of 2 occur in definite positions in that tree. This conjecture also implies the conjectures made in A019565 and A285320 that essentially claim that there are neither finite nor infinite cycles in A019565.
If there are any 2-cycles in this sequence, then both terms of the cycle should be present in A286611 and the larger one should be present in A286612.
(End)
Binary rank of the distinct prime indices of n, where the binary rank of an integer partition y is given by Sum_i 2^(y_i-1). For all prime indices (with multiplicity) we have A048675. - Gus Wiseman, May 25 2024

Examples

			a(38) = 129 because 38 = 2*19 = prime(1)*prime(8) and 129 = 2^0 + 2^7 (in binary 10000001).
a(140) = 13, binary 1101 because 140 is divisible by the first, third and fourth primes and 2^(1-1) + 2^(3-1) + 2^(4-1) = 13.
		

Crossrefs

For partial sums see A288566.
Sequences with related definitions: A007947, A008472, A027748, A048675, A248663, A276379 (same sequence shown in base 2), A288569, A289271, A297404.
Cf. A286608 (numbers n for which a(n) < n), A286609 (n for which a(n) > n), and also A286611, A286612.
A003986, A003961, A059896 are used to express relationship between terms of this sequence.
Related to A267116 via A225546.
Positions of particular values are: A000079\{1} (1), A000244\{1} (2), A033845 (3), A000351\{1} (4), A033846 (5), A033849 (6), A143207 (7), A000420\{1} (8), A033847 (9), A033850 (10), A033851 (12), A147576 (14), A147571 (15), A001020\{1} (16), A033848 (17).
A048675 gives binary rank of prime indices.
A061395 gives greatest prime index, least A055396.
A112798 lists prime indices, length A001222, reverse A296150, sum A056239.
Binary indices (listed A048793):
- length A000120, complement A023416
- min A001511, opposite A000012
- sum A029931, product A096111
- max A029837 or A070939, opposite A070940
- complement A368494, sum A359400
- opposite complement A371571, sum A359359
- opposite A371572, sum A230877

Programs

  • Haskell
    a087207 = sum . map ((2 ^) . (subtract 1) . a049084) . a027748_row
    -- Reinhard Zumkeller, Jul 16 2013
    
  • Mathematica
    a[n_] := Total[ 2^(PrimePi /@ FactorInteger[n][[All, 1]] - 1)]; a[1] = 0; Table[a[n], {n, 1, 69}] (* Jean-François Alcover, Dec 12 2011 *)
  • PARI
    a(n) = {if (n==1, 0, my(f=factor(n), v = []); forprime(p=2, vecmax(f[,1]), v = concat(v, vecsearch(f[,1], p)!=0);); fromdigits(Vecrev(v), 2));} \\ Michel Marcus, Jun 05 2017
    
  • PARI
    A087207(n)=vecsum(apply(p->1<M. F. Hasler, Jun 23 2017
    
  • Python
    from sympy import factorint, primepi
    def a(n):
        return sum(2**primepi(i - 1) for i in factorint(n))
    print([a(n) for n in range(1, 101)]) # Indranil Ghosh, Jun 06 2017
    
  • Scheme
    (definec (A087207 n) (if (= 1 n) 0 (+ (A000079 (+ -1 (A055396 n))) (A087207 (A028234 n))))) ;; This uses memoization-macro definec
    (define (A087207 n) (A048675 (A007947 n))) ;; Needs code from A007947 and A048675. - Antti Karttunen, Jun 19 2017

Formula

Additive with a(p^e) = 2^(i-1) where p is the i-th prime. - Vladeta Jovovic, Oct 29 2003
a(n) gives the m such that A019565(m) = A007947(n). - Naohiro Nomoto, Oct 30 2003
A000120(a(n)) = A001221(n); a(n) = Sum(2^(A049084(p)-1): p prime-factor of n). - Reinhard Zumkeller, Nov 30 2003
G.f.: Sum_{k>=1} 2^(k-1)*x^prime(k)/(1-x^prime(k)). - Franklin T. Adams-Watters, Sep 01 2009
From Antti Karttunen, Apr 17 2017, Jun 19 2017 & Dec 06 2018: (Start)
a(n) = A048675(A007947(n)).
a(1) = 0; for n > 1, a(n) = 2^(A055396(n)-1) + a(A028234(n)).
A000035(a(n)) = 1 - A000035(n). [a(n) and n are of opposite parity.]
A248663(n) <= a(n) <= A048675(n). [XOR-, OR- and +-variants.]
a(A293214(n)) = A218403(n).
a(A293442(n)) = A267116(n).
A069010(a(n)) = A287170(n).
A007088(a(n)) = A276379(n).
A038374(a(n)) = A300820(n) for n >= 1.
(End)
From Peter Munn, Jan 08 2020: (Start)
a(A059896(n,k)) = a(n) OR a(k) = A003986(a(n), a(k)).
a(A003961(n)) = 2*a(n).
a(n^2) = a(n).
a(n) = A267116(A225546(n)).
a(A225546(n)) = A267116(n).
(End)

Extensions

More terms from Don Reble, Ray Chandler and Naohiro Nomoto, Oct 28 2003
Name clarified by Antti Karttunen, Jun 18 2017

A033846 Numbers whose prime factors are 2 and 5.

Original entry on oeis.org

10, 20, 40, 50, 80, 100, 160, 200, 250, 320, 400, 500, 640, 800, 1000, 1250, 1280, 1600, 2000, 2500, 2560, 3200, 4000, 5000, 5120, 6250, 6400, 8000, 10000, 10240, 12500, 12800, 16000, 20000, 20480, 25000, 25600, 31250, 32000, 40000, 40960
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that Sum_{d prime divisor of k} 1/d = 7/10. - Benoit Cloitre, Apr 13 2002
Numbers k such that phi(k) = (2/5)*k. - Benoit Cloitre, Apr 19 2002
Numbers k such that Sum_{d|k} A008683(d)*A000700(d) = 7. - Carl Najafi, Oct 20 2011

Crossrefs

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a033846 n = a033846_list !! (n-1)
    a033846_list = f (singleton (2*5)) where
       f s = m : f (insert (2*m) $ insert (5*m) s') where
         (m,s') = deleteFindMin s
    -- Reinhard Zumkeller, Sep 13 2011
    
  • Magma
    [n:n in [1..100000]| Set(PrimeDivisors(n)) eq {2,5}]; // Marius A. Burtea, May 10 2019
  • Maple
    A033846 := proc(n)
    if (numtheory[factorset](n) = {2,5}) then
       RETURN(n)
    fi: end:  seq(A033846(n),n=1..50000); # Jani Melik, Feb 24 2011
  • Mathematica
    Take[Union[Times@@@Select[Flatten[Table[Tuples[{2,5},n],{n,2,15}],1], Length[Union[#]]>1&]],45] (* Harvey P. Dale, Dec 15 2011 *)
  • PARI
    isA033846(n)=factor(n)[,1]==[2,5]~ \\ Charles R Greathouse IV, Feb 24 2011
    

Formula

a(n) = 10*A003592(n).
A143201(a(n)) = 4. - Reinhard Zumkeller, Sep 13 2011
Sum_{n>=1} 1/a(n) = 1/4. - Amiram Eldar, Dec 22 2020

Extensions

Offset fixed by Reinhard Zumkeller, Sep 13 2011

A033849 Numbers whose prime factors are 3 and 5.

Original entry on oeis.org

15, 45, 75, 135, 225, 375, 405, 675, 1125, 1215, 1875, 2025, 3375, 3645, 5625, 6075, 9375, 10125, 10935, 16875, 18225, 28125, 30375, 32805, 46875, 50625, 54675, 84375, 91125, 98415, 140625, 151875, 164025, 234375, 253125, 273375, 295245
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that phi(k) = (8/15)*k. - Benoit Cloitre, Apr 19 2002
Subsequence of A143202. - Reinhard Zumkeller, Sep 13 2011

Crossrefs

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a033849 n = a033849_list !! (n-1)
    a033849_list = f (singleton (3*5)) where
       f s = m : f (insert (3*m) $ insert (5*m) s') where
         (m,s') = deleteFindMin s
    -- Reinhard Zumkeller, Sep 13 2011
    
  • Mathematica
    Sort[Flatten[Table[Table[3^j*5^k, {j, 1, 10}], {k, 1, 10}]]] (* Geoffrey Critzer, Dec 07 2014 *)
    Select[Range[300000],FactorInteger[#][[All,1]]=={3,5}&] (* Harvey P. Dale, Oct 19 2022 *)
  • Python
    from sympy import integer_log
    def A033849(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 n+x-sum(integer_log(x//5**i,3)[0]+1 for i in range(integer_log(x,5)[0]+1))
        return 15*bisection(f,n,n) # Chai Wah Wu, Oct 22 2024

Formula

From Reinhard Zumkeller, Sep 13 2011: (Start)
A143201(a(n)) = 3.
a(n) = 15*A003593(n). (End)
Sum_{n>=1} 1/a(n) = 1/8. - Amiram Eldar, Dec 22 2020

Extensions

Offset and typo in data fixed by Reinhard Zumkeller, Sep 13 2011

A033877 Triangular array read by rows associated with Schroeder numbers: T(1,k) = 1; T(n,k) = 0 if k < n; T(n,k) = T(n,k-1) + T(n-1,k-1) + T(n-1,k).

Original entry on oeis.org

1, 1, 2, 1, 4, 6, 1, 6, 16, 22, 1, 8, 30, 68, 90, 1, 10, 48, 146, 304, 394, 1, 12, 70, 264, 714, 1412, 1806, 1, 14, 96, 430, 1408, 3534, 6752, 8558, 1, 16, 126, 652, 2490, 7432, 17718, 33028, 41586, 1, 18, 160, 938, 4080, 14002, 39152, 89898, 164512, 206098
Offset: 1

Views

Author

Keywords

Comments

A106579 is in some ways a better version of this sequence, but since this was entered first it will be the main entry for this triangle.
The diagonals of this triangle are self-convolutions of the main diagonal A006318: 1, 2, 6, 22, 90, 394, 1806, ... . - Philippe Deléham, May 15 2005
From Johannes W. Meijer, Sep 22 2010, Jul 15 2013: (Start)
Note that for the terms T(n,k) of this triangle n indicates the column and k the row.
The triangle sums, see A180662, link Schroeder's triangle with several sequences, see the crossrefs. The mirror of this triangle is A080247.
Quite surprisingly the Kn1p sums, p >= 1, are all related to A026003 and crystal ball sequences for n-dimensional cubic lattices (triangle offset is 0): Kn11(n) = A026003(n), Kn12(n) = A026003(n+2) - 1, Kn13(n) = A026003(n+4) - A005408(n+3), Kn14(n) = A026003(n+6) - A001844(n+4), Kn15(n) = A026003(n+8) - A001845(n+5), Kn16(n) = A026003(n+10) - A001846(n+6), Kn17(n) = A026003(n+12) - A001847(n+7), Kn18(n) = A026003(n+14) - A001848(n+8), Kn19(n) = A026003(n+16) - A001849(n+9), Kn110(n) = A026003(n+18) - A008417(n+10), Kn111(n) = A026003(n+20) - A008419(n+11), Kn112(n) = A026003(n+22) - A008421(n+12). (End)
T(n,k) is the number of normal semistandard Young tableaux with two columns, one of height k and one of height n. The recursion can be seen by performing jeu de taquin deletion on all instances of the smallest value. (If there are two instances of the smallest value, jeu de taquin deletion will always shorten the right column first and the left column second.) - Jacob Post, Jun 19 2018

Examples

			Triangle starts:
  1;
  1,    2;
  1,    4,    6;
  1,    6,   16,   22;
  1,    8,   30,   68,   90;
  1,   10,   48,  146,  304,  394;
  1,   12,   70,  264,  714, 1412, 1806;
  ... - _Joerg Arndt_, Sep 29 2013
		

Crossrefs

Essentially same triangle as A080247 and A080245 but with rows read in reversed order. Also essentially the same triangle as A106579.
Cf. A001003 (row sums), A026003 (antidiagonal sums).
Triangle sums (see the comments): A001003 (Row1, Row2), A026003 (Kn1p, p >= 1), A006603 (Kn21), A227504 (Kn22), A227505 (Kn23), A006603(2*n) (Kn3), A001850 (Kn4), A227506 (Fi1), A010683 (Fi2).

Programs

  • Haskell
    a033877 n k = a033877_tabl !! n !! k
    a033877_row n = a033877_tabl !! n
    a033877_tabl = iterate
       (\row -> scanl1 (+) $ zipWith (+) ([0] ++ row) (row ++ [0])) [1]
    -- Reinhard Zumkeller, Apr 17 2013
    
  • Magma
    function t(n,k)
      if k le 0 or k gt n then return 0;
      elif k eq 1 then return 1;
      else return t(n,k-1) + t(n-1,k-1) + t(n-1,k);
      end if;
    end function;
    [t(n,k): k in [1..n], n in [1..12]]; // G. C. Greubel, Mar 23 2023
  • Maple
    T := proc(n, k) option remember; if n=1 then return(1) fi; if kJohannes W. Meijer, Sep 22 2010, revised Jul 17 2013
  • Mathematica
    T[1, ]:= 1; T[n, k_]/;(k
    				
  • Sage
    def A033877_row(n):
        @cached_function
        def prec(n, k):
            if k==n: return 1
            if k==0: return 0
            return prec(n-1,k-1)-2*sum(prec(n,k+i-1) for i in (2..n-k+1))
        return [(-1)^k*prec(n, n-k) for k in (0..n-1)]
    for n in (1..10): print(A033877_row(n)) # Peter Luschny, Mar 16 2016
    
  • SageMath
    @CachedFunction
    def t(n, k): # t = A033847
        if (k<0 or k>n): return 0
        elif (k==1): return 1
        else: return t(n, k-1) + t(n-1, k-1) + t(n-1, k)
    flatten([[t(n,k) for k in range(1,n+1)] for n in range(1, 16)]) # G. C. Greubel, Mar 23 2023
    

Formula

As an upper right triangle: a(n, k) = a(n, k-1) + a(n-1, k-1) + a(n-1, k) if k >= n >= 0 and a(n, k) = 0 otherwise.
G.f.: Sum T(n, k)*x^n*y^k = (1-x*y-(x^2*y^2-6*x*y+1)^(1/2)) / (x*(2*y+x*y-1+(x^2*y^2-6*x*y+1)^(1/2))). - Vladeta Jovovic, Feb 16 2003
Another version of A000007 DELTA [0, 2, 1, 2, 1, 2, 1, 2, 1, 2, ...] = 1, 1, 0, 1, 2, 0, 1, 4, 6, 0, 1, 6, 16, 22, 0, 1, ..., where DELTA is Deléham's operator defined in A084938.
Sum_{n=1..floor((k+1)/2)} T(n+p-1, k-n+p) = A026003(2*p+k-3) - A008288(2*p+k-3, p-2), p >= 2, k >= 1. - Johannes W. Meijer, Sep 28 2013
From G. C. Greubel, Mar 23 2023: (Start)
(t(n, k) as a lower triangle)
t(n, k) = t(n, k-1) + t(n-1, k-1) + t(n-1, k) with t(n, 1) = 1.
t(n, n) = A006318(n-1).
t(2*n-1, n) = A330801(n-1).
t(2*n-2, n) = A103885(n-1), n > 1.
Sum_{k=1..n-1} t(n, k) = A238112(n), n > 1.
Sum_{k=1..n} t(n, k) = A001003(n).
Sum_{k=1..n-1} (-1)^(k-1)*t(n, k) = (-1)^n*A001003(n-1), n > 1.
Sum_{k=1..n} (-1)^(k-1)*t(n, k) = A080243(n-1).
Sum_{k=1..floor((n+1)/2)} t(n-k+1, k) = A026003(n-1). (End)

Extensions

More terms from David W. Wilson

A109395 Denominator of phi(n)/n = Product_{p|n} (1 - 1/p); phi(n)=A000010(n), the Euler totient function.

Original entry on oeis.org

1, 2, 3, 2, 5, 3, 7, 2, 3, 5, 11, 3, 13, 7, 15, 2, 17, 3, 19, 5, 7, 11, 23, 3, 5, 13, 3, 7, 29, 15, 31, 2, 33, 17, 35, 3, 37, 19, 13, 5, 41, 7, 43, 11, 15, 23, 47, 3, 7, 5, 51, 13, 53, 3, 11, 7, 19, 29, 59, 15, 61, 31, 7, 2, 65, 33, 67, 17, 69, 35, 71, 3, 73, 37, 15, 19, 77, 13, 79, 5, 3
Offset: 1

Views

Author

Franz Vrabec, Aug 26 2005

Keywords

Comments

a(n)=2 iff n=2^k (k>0); otherwise a(n) is odd. If p is prime, a(p)=p; the converse is false, e.g.: a(15)=15. It is remarkable that this sequence often coincides with A006530, the largest prime P dividing n. Theorem: a(n)=P if and only if for every prime p < P in n there is some prime q in n with p|(q-1). - Franz Vrabec, Aug 30 2005

Examples

			a(10) = 10/gcd(10,phi(10)) = 10/gcd(10,4) = 10/2 = 5.
		

Crossrefs

Cf. A076512 for the numerator.
Phi(m)/m = k: A000079 \ {1} (k=1/2), A033845 (k=1/3), A000244 \ {1} (k=2/3), A033846 (k=2/5), A000351 \ {1} (k=4/5), A033847 (k=3/7), A033850 (k=4/7), A000420 \ {1} (k=6/7), A033848 (k=5/11), A001020 \ {1} (k=10/11), A288162 (k=6/13), A001022 \ {1} (12/13), A143207 (k=4/15), A033849 (k=8/15), A033851 (k=24/35).

Programs

Formula

a(n) = n/gcd(n, phi(n)) = n/A009195(n).
From Antti Karttunen, Feb 09 2019: (Start)
a(n) = denominator of A173557(n)/A007947(n).
a(2^n) = 2 for all n >= 1.
(End)
From Amiram Eldar, Jul 31 2020: (Start)
Asymptotic mean of phi(n)/n: lim_{m->oo} (1/m) * Sum_{n=1..m} A076512(n)/a(n) = 6/Pi^2 (A059956).
Asymptotic mean of n/phi(n): lim_{m->oo} (1/m) * Sum_{n=1..m} a(n)/A076512(n) = zeta(2)*zeta(3)/zeta(6) (A082695). (End)

A076512 Denominator of cototient(n)/totient(n).

Original entry on oeis.org

1, 1, 2, 1, 4, 1, 6, 1, 2, 2, 10, 1, 12, 3, 8, 1, 16, 1, 18, 2, 4, 5, 22, 1, 4, 6, 2, 3, 28, 4, 30, 1, 20, 8, 24, 1, 36, 9, 8, 2, 40, 2, 42, 5, 8, 11, 46, 1, 6, 2, 32, 6, 52, 1, 8, 3, 12, 14, 58, 4, 60, 15, 4, 1, 48, 10, 66, 8, 44, 12, 70, 1, 72, 18, 8, 9, 60, 4, 78, 2, 2, 20, 82, 2, 64, 21
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 15 2002

Keywords

Comments

a(n)=1 iff n=A007694(k) for some k.
Numerator of phi(n)/n=Prod_{p|n} (1-1/p). - Franz Vrabec, Aug 26 2005
From Wolfdieter Lang, May 12 2011: (Start)
For n>=2, a(n)/A109395(n) = sum(((-1)^r)*sigma_r,r=0..M(n)) with the elementary symmetric functions (polynomials) sigma_r of the indeterminates {1/p_1,...,1/p_M(n)} if n = prod((p_j)^e(j),j=1..M(n)) where M(n)=A001221(n) and sigma_0=1.
This follows by expanding the above given product for phi(n)/n.
The n-th member of this rational sequence 1/2, 2/3, 1/2, 4/5, 1/3, 6/7, 1/2, 2/3, 2/5,... is also (2/n^2)*sum(k,with 1<=k=2.
Therefore, this scaled sum depends only on the distinct prime factors of n.
See also A023896. Proof via PIE (principle of inclusion and exclusion). (End)
In the sequence of rationals r(n)=eulerphi(n)/n: 1, 1/2, 2/3, 1/2, 4/5, 1/3, 6/7, 1/2, 2/3, 2/5, 10/11, 1/3, ... one can observe that new values are obtained for squarefree indices (A005117); while for a nonsquarefree number n (A013929), r(n) = r(A007947(n)), where A007947(n) is the squarefree kernel of n. - Michel Marcus, Jul 04 2015

Crossrefs

Cf. A076511 (numerator of cototient(n)/totient(n)), A051953.
Phi(m)/m = k: A000079 \ {1} (k=1/2), A033845 (k=1/3), A000244 \ {1} (k=2/3), A033846 (k=2/5), A000351 \ {1} (k=4/5), A033847 (k=3/7), A033850 (k=4/7), A000420 \ {1} (k=6/7), A033848 (k=5/11), A001020 \ {1} (k=10/11), A288162 (k=6/13), A001022 \ {1} (12/13), A143207 (k=4/15), A033849 (k=8/15), A033851 (k=24/35).

Programs

  • Magma
    [Numerator(EulerPhi(n)/n): n in [1..100]]; // Vincenzo Librandi, Jul 04 2015
  • Mathematica
    Table[Denominator[(n - EulerPhi[n])/EulerPhi[n]], {n, 80}] (* Alonso del Arte, May 12 2011 *)
  • PARI
    vector(80, n, numerator(eulerphi(n)/n)) \\ Michel Marcus, Jul 04 2015
    

Formula

a(n) = A000010(n)/A009195(n).

A143201 Product of distances between prime factors in factorization of n.

Original entry on oeis.org

1, 1, 1, 1, 1, 2, 1, 1, 1, 4, 1, 2, 1, 6, 3, 1, 1, 2, 1, 4, 5, 10, 1, 2, 1, 12, 1, 6, 1, 6, 1, 1, 9, 16, 3, 2, 1, 18, 11, 4, 1, 10, 1, 10, 3, 22, 1, 2, 1, 4, 15, 12, 1, 2, 7, 6, 17, 28, 1, 6, 1, 30, 5, 1, 9, 18, 1, 16, 21, 12, 1, 2, 1, 36, 3, 18, 5, 22, 1, 4, 1, 40, 1, 10, 13, 42, 27, 10, 1, 6, 7, 22
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 12 2008

Keywords

Comments

a(n) is the product of the sum of 1 and first differences of prime factors of n with multiplicity, with a(n) = 1 for n = 1 or prime n. - Michael De Vlieger, Nov 12 2023.
a(A007947(n)) = a(n);
A006093 and A001747 give record values and where they occur:
A006093(n)=a(A001747(n+1)) for n>1.
a(n) = 1 iff n is a prime power: a(A000961(n))=1;
a(n) = 2 iff n has exactly 2 and 3 as prime factors:
a(A033845(n))=2;
a(n) = 3 iff n is in A143202;
a(n) = 4 iff n has exactly 2 and 5 as prime factors:
a(A033846(n))=4;
a(n) = 5 iff n is in A143203;
a(n) = 6 iff n is in A143204;
a(n) = 7 iff n is in A143205;
a(n) <> A006512(k)+1 for k>1.
a(A033849(n))=3; a(A033851(n))=3; a(A033850(n))=5; a(A033847(n))=6; a(A033848(n))=10. [Reinhard Zumkeller, Sep 19 2011]

Examples

			a(86) = a(43*2) = 43-2+1 = 42;
a(138) = a(23*3*2) = (23-3+1)*(3-2+1) = 42;
a(172) = a(43*2*2) = (43-2+1)*(2-2+1) = 42;
a(182) = a(13*7*2) = (13-7+1)*(7-2+1) = 42;
a(276) = a(23*3*2*2) = (23-3+1)*(3-2+1)*(2-2+1) = 42;
a(330) = a(11*5*3*2) = (11-5+1)*(5-3+1)*(3-2+1) = 42.
		

Crossrefs

Programs

  • Haskell
    a143201 1 = 1
    a143201 n = product $ map (+ 1) $ zipWith (-) (tail pfs) pfs
       where pfs = a027748_row n
    -- Reinhard Zumkeller, Sep 13 2011
  • Mathematica
    Table[Times@@(Differences[Flatten[Table[First[#],{Last[#]}]&/@ FactorInteger[ n]]]+1),{n,100}] (* Harvey P. Dale, Dec 07 2011 *)

Formula

a(n) = f(n,1,1) where f(n,q,y) = if n=1 then y else if q=1 then f(n/p,p,1)) else f(n/p,p,y*(p-q+1)) with p = A020639(n) = smallest prime factor of n.

A033850 Numbers whose prime factors are 3 and 7.

Original entry on oeis.org

21, 63, 147, 189, 441, 567, 1029, 1323, 1701, 3087, 3969, 5103, 7203, 9261, 11907, 15309, 21609, 27783, 35721, 45927, 50421, 64827, 83349, 107163, 137781, 151263, 194481, 250047, 321489, 352947, 413343, 453789, 583443, 750141, 964467
Offset: 1

Views

Author

Keywords

Comments

Numbers k such that phi(k)/k = 4/7, where phi is the Euler totient function A000010. - Lekraj Beedassy, Jul 18 2008
Subsequence of A143203. - Reinhard Zumkeller, Sep 13 2011

References

  • J.-M. De Koninck, Ces nombres qui nous fascinent, Entry 189, p. 57, Ellipses, Paris 2008.

Crossrefs

Programs

  • Haskell
    import Data.Set (singleton, deleteFindMin, insert)
    a033850 n = a033850_list !! (n-1)
    a033850_list = f (singleton (3*7)) where
       f s = m : f (insert (3*m) $ insert (7*m) s') where
         (m,s') = deleteFindMin s
    -- Reinhard Zumkeller, Sep 13 2011
  • Mathematica
    Select[Range[10^6],Union[FactorInteger[#][[;;,1]]]=={3,7}&] (* Harvey P. Dale, Mar 01 2023 *)

Formula

A143201(a(n)) = 5. - Reinhard Zumkeller, Sep 13 2011
Sum_{n>=1} 1/a(n) = 1/12. - Amiram Eldar, Dec 22 2020

Extensions

Offset fixed by Reinhard Zumkeller, Sep 13 2011
Showing 1-10 of 20 results. Next