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 41-50 of 5121 results. Next

A160812 a(n) = A161205(n)-A000005(n).

Original entry on oeis.org

0, 0, 0, 0, 2, 0, 2, 0, 2, 2, 4, 0, 4, 2, 2, 2, 6, 2, 6, 2, 4, 4, 6, 0, 6, 6, 6, 4, 8, 2, 8, 4, 6, 6, 6, 2, 10, 8, 8, 4, 10, 4, 10, 6, 6, 8, 10, 2, 10, 8, 10, 8, 12, 6, 10, 6, 10, 10, 12, 2, 12, 10, 8, 8, 12, 8, 14, 10, 12, 8, 14, 4, 14, 12, 10, 10, 12, 8, 14, 6, 12, 14, 16, 6, 14, 14, 14, 10, 16, 6
Offset: 1

Views

Author

Omar E. Pol, Jun 19 2009

Keywords

Comments

It appears that a(n)= 0 if and only if n divides 24 (See also the comments in A018253).

Crossrefs

Formula

a(n) = 2*(A000196(n) - A038548(n)) = 2*A236627(n). - Omar E. Pol, Feb 05 2014

Extensions

Edited by Omar E. Pol, Aug 02 2009

A295664 Exponent of the highest power of 2 dividing number of divisors of n: a(n) = A007814(A000005(n)); 2-adic valuation of tau(n).

Original entry on oeis.org

0, 1, 1, 0, 1, 2, 1, 2, 0, 2, 1, 1, 1, 2, 2, 0, 1, 1, 1, 1, 2, 2, 1, 3, 0, 2, 2, 1, 1, 3, 1, 1, 2, 2, 2, 0, 1, 2, 2, 3, 1, 3, 1, 1, 1, 2, 1, 1, 0, 1, 2, 1, 1, 3, 2, 3, 2, 2, 1, 2, 1, 2, 1, 0, 2, 3, 1, 1, 2, 3, 1, 2, 1, 2, 1, 1, 2, 3, 1, 1, 0, 2, 1, 2, 2, 2, 2, 3, 1, 2, 2, 1, 2, 2, 2, 2, 1, 1, 1, 0, 1, 3, 1, 3, 3, 2, 1, 2, 1, 3, 2, 1, 1, 3, 2, 1, 1, 2, 2, 4, 0
Offset: 1

Views

Author

Antti Karttunen, Nov 28 2017

Keywords

Comments

In the prime factorization of n = p1^e1 * ... pk^ek, add together the number of trailing 1-bits in each exponent e when they are written in binary.

Crossrefs

Cf. A000290 (positions of zeros).

Programs

  • Mathematica
    Table[IntegerExponent[DivisorSigma[0, n], 2], {n, 120}] (* Michael De Vlieger, Nov 28 2017 *)
  • PARI
    a(n) = valuation(numdiv(n), 2); \\ Michel Marcus, Nov 30 2017
    
  • Python
    from sympy import divisor_count
    def A295664(n): return (~(m:=int(divisor_count(n))) & m-1).bit_length() # Chai Wah Wu, Jul 05 2022

Formula

Additive with a(p^e) = A007814(1+e).
a(1) = 0; for n > 1, a(n) = A007814(1+A067029(n)) + a(A028234(n)).
a(n) = A007814(A000005(n)).
a(n) >= A162642(n) >= A056169(n).
Sum_{k=1..n} a(k) ~ n * (log(log(n)) + B + C), where B is Mertens's constant (A077761) and C = Sum_{p prime} f(1/p) =-0.223720656976344505701..., where f(x) = -x + (1-x) * Sum_{k>=1} x^(2^k-1)/(1-x^(2^k)). - Amiram Eldar, Sep 28 2023

A339258 Triangle read by rows T(n,k), (n >= 1, k > = 1), in which row n has length A000070(n-1) and every column gives A000005, the number of divisors function.

Original entry on oeis.org

1, 2, 1, 2, 2, 1, 1, 3, 2, 2, 2, 1, 1, 1, 2, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 4, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 2, 4, 2, 2, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 4, 2, 4, 4, 2, 2, 2, 3, 3, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2
Offset: 1

Views

Author

Omar E. Pol, Nov 29 2020

Keywords

Comments

Conjecture: the sum of row n equals A006128(n), the total number of parts in all partitions of n.

Examples

			Triangle begins:
  1;
  2, 1;
  2, 2, 1, 1;
  3, 2, 2, 2, 1, 1, 1;
  2, 3, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1;
  4, 2, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1;
  2, 4, 2, 2, 3, 3, 3, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 1, 1, 1, 1, ...
  ...
		

Crossrefs

Row sums give A006128 (conjectured).

Programs

  • Mathematica
    A339258row[n_]:=Flatten[Table[ConstantArray[DivisorSigma[0,n-m],PartitionsP[m]],{m,0,n-1}]];Array[A339258row,10] (* Paolo Xausa, Sep 02 2023 *)
  • PARI
    f(n) = sum(k=0, n-1, numbpart(k));
    T(n, k) = {if (k > f(n), error("invalid k")); if (k==1, return (numdiv(n))); my(s=0); while (k <= f(n-1), s++; n--;); numdiv(1+s);}
    tabf(nn) = {for (n=1, nn, for (k=1, f(n), print1(T(n,k), ", ");); print;);} \\ Michel Marcus, Jan 13 2021

Formula

T(n,k) = A000005(A176206(n,k)).

A360179 a(1) = 1. Thereafter if a(n-1) is a novel term, a(n) = d(a(n-1)); otherwise a(n) = a(n-1) + d(u), where d is the divisor function A000005 and u is the smallest unstarred prior term (each time we use a prior term we star it, and starred terms cannot be reused).

Original entry on oeis.org

1, 1, 2, 2, 3, 2, 4, 3, 5, 2, 4, 6, 4, 6, 8, 4, 7, 2, 5, 7, 10, 4, 7, 10, 12, 6, 8, 12, 16, 5, 9, 3, 5, 7, 9, 11, 2, 4, 6, 9, 13, 2, 4, 6, 9, 13, 15, 4, 8, 11, 15, 19, 2, 5, 7, 9, 11, 14, 4, 7, 10, 12, 15, 18, 6, 10, 14, 18, 22, 4, 8, 11
Offset: 1

Views

Author

David James Sycamore, Jan 29 2023

Keywords

Comments

Whilst the definition is subtly different from that of A345147, d(u) being used in place of u, the scatterplots are remarkably different, the one for this sequence displaying numerous precipitous "gorges" which are open to explanation. 1 is the only number which occurs precisely twice, all other numbers are repeated infinitely many times.
From Michael De Vlieger, Apr 04 2023: (Start)
The sequence is a series of nondecreasing cycles that reach a maximum M and then reset to start a new cycle. (See scatterplot B.)
The sequence is dynamic and responds to a bank of copies of the same number called a "prevailing low" L. When M < L, the sequence experiences a run of short or "crashed" cycles that make no headway at eliminating the copies of L, resulting in a "gorge" in the scatterplot.
Referring to scatterplot A:
The green line represents the smallest missing number u and is not actually a feature of the sequence. The red line represents the "prevailing low" L(n), also is not a feature of the sequence.
Dark blue terms a(n) = tau(a(n-1))..421 populate a "semi-coherent" phase (1A) of cycle c(i), where tau(n) = A000005(n).
Light blue terms a(n) = 422..L populate the "coherent" phase (1B) of cycle c(i). Black terms m > L populate phase (2) of c(i).
Magenta terms constitute a crashed cycle that has M < L; multiple consecutive crashed cycles constitute a gorge. In crashed cycles, we have only phase (1).
The "triple point" of the graph, where we first have phase (1B), appears to be a(14478) = 414, but is in actuality (given 2^20 terms) a(14786) = 422. (End)

Examples

			a(2) = 1 since a(1) = 1 is a novel term and d(1) = 1. Thus the sequence starts 1,1 and since a(2) is a repeated term, a(3) = a(2) + d(1) (1 = least unstarred prior term). Therefore a(3) = 1 + 1 = 2.
		

Crossrefs

Cf. A362127 records, A362128 indices of records.
Cf. A362129 a(n) mod 2, A362130 d(a(n)) mod 2.
Cf. A362131 smallest missing number in a(1..n).
Cf. A362134 novel terms, A362135 indices of novel terms.
Cf. A362136 row lengths, if this sequence seen as rows of strictly increasing terms.
See A361511 for another version.

Programs

  • Mathematica
    nn = 120; c[] := False; h[] := 0; f[n_] := DivisorSigma[0, n]; a[1] = j = u = 1; Do[If[c[j], k = j + f[u]; h[j]++; h[u]--, k = f[j]; c[j] = True; h[j]++]; u = Min[u, j]; Set[{a[n], j}, {k, k}]; While[h[u] == 0, u++], {n, 2, nn}]; Array[a, nn] (* Michael De Vlieger, Feb 02 2023 *)

A371165 Positive integers with as many divisors (A000005) as distinct divisors of prime indices (A370820).

Original entry on oeis.org

3, 5, 11, 17, 26, 31, 35, 38, 39, 41, 49, 57, 58, 59, 65, 67, 69, 77, 83, 86, 87, 94, 109, 119, 127, 129, 133, 146, 148, 157, 158, 179, 191, 202, 206, 211, 217, 235, 237, 241, 244, 253, 274, 277, 278, 283, 284, 287, 291, 298, 303, 319, 326, 331, 333, 334, 353
Offset: 1

Views

Author

Gus Wiseman, Mar 14 2024

Keywords

Comments

A prime index of n is a number m such that prime(m) divides n. The multiset of prime indices of n is row n of A112798.

Examples

			The terms together with their prime indices begin:
     3: {2}        67: {19}        158: {1,22}
     5: {3}        69: {2,9}       179: {41}
    11: {5}        77: {4,5}       191: {43}
    17: {7}        83: {23}        202: {1,26}
    26: {1,6}      86: {1,14}      206: {1,27}
    31: {11}       87: {2,10}      211: {47}
    35: {3,4}      94: {1,15}      217: {4,11}
    38: {1,8}     109: {29}        235: {3,15}
    39: {2,6}     119: {4,7}       237: {2,22}
    41: {13}      127: {31}        241: {53}
    49: {4,4}     129: {2,14}      244: {1,1,18}
    57: {2,8}     133: {4,8}       253: {5,9}
    58: {1,10}    146: {1,21}      274: {1,33}
    59: {17}      148: {1,1,12}    277: {59}
    65: {3,6}     157: {37}        278: {1,34}
		

Crossrefs

For prime factors instead of divisors on both sides we get A319899.
For prime factors on LHS we get A370802, for distinct prime factors A371177.
The RHS is A370820, for prime factors instead of divisors A303975.
For (greater than) instead of (equal) we get A371166.
For (less than) instead of (equal) we get A371167.
Partitions of this type are counted by A371172.
Other inequalities: A370348 (A371171), A371168 (A371173), A371169, A371170.
A000005 counts divisors.
A001221 counts distinct prime factors.
A027746 lists prime factors, A112798 indices, length A001222.
A239312 counts divisor-choosable partitions, ranks A368110.
A355731 counts choices of a divisor of each prime index, firsts A355732.
A370320 counts non-divisor-choosable partitions, ranks A355740.
A370814 counts divisor-choosable factorizations, complement A370813.

Programs

  • Mathematica
    Select[Range[100],Length[Divisors[#]] == Length[Union@@Divisors/@PrimePi/@First/@If[#==1,{},FactorInteger[#]]]&]

Formula

A000005(a(n)) = A370820(a(n)).

A051281 Sum of divisors of n, sigma(n) (A000203), is a power of number of divisors of n, d(n) (A000005).

Original entry on oeis.org

1, 3, 7, 31, 127, 217, 889, 2667, 3937, 8191, 27559, 57337, 131071, 172011, 253921, 524287, 917497, 1040257, 1777447, 3670009, 4063201, 11010027, 12189603, 16252897, 16646017, 66584449, 113770279, 116522119, 225735769, 677207307, 1073602561, 2147483647, 3612185689, 4294434817, 7515217927
Offset: 1

Views

Author

Keywords

Comments

All Mersenne primes (A000668) are terms.
Subsequence of A046528 (product of distinct Mersenne primes). - Michel Marcus, Feb 15 2020

Examples

			d(217) = 4; sigma(217) = 256 = 4^4.
		

Crossrefs

Programs

  • Mathematica
    spdQ[n_]:=Module[{sd=DivisorSigma[1,n],nd=DivisorSigma[0,n]},sd == nd^IntegerExponent[sd,nd]]; Join[{1},Select[Range[2,226000000],spdQ]] (* Harvey P. Dale, May 02 2012 *)
  • PARI
    is(n)=my(t,e=ispower(sigma(n),,&t)); if(!e,return(n==1),nd); nd=numdiv(n); fordiv(e,d,if(t^d==nd,return(1)));0 \\ Charles R Greathouse IV, Feb 19 2013
    
  • PARI
    isA051281(n) = { if(n==1, return(1)); my(sig = sigma(n), ndiv = numdiv(n), v = valuation(sig, ndiv)); (ndiv^v == sig); } \\ Antti Karttunen, Jun 30 2017

Extensions

More terms from Jud McCranie
a(30)-a(32) from Donovan Johnson, Oct 03 2012
a(33)-a(35) from Michel Marcus, Feb 14 2020

A061017 List in which n appears d(n) times, where d(n) [A000005] is the number of divisors of n.

Original entry on oeis.org

1, 2, 2, 3, 3, 4, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 8, 8, 9, 9, 9, 10, 10, 10, 10, 11, 11, 12, 12, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 18, 18, 19, 19, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 24
Offset: 1

Views

Author

Jont Allen (jba(AT)research.att.com), May 25 2001

Keywords

Comments

The union of N, 2N, 3N, ..., where N = {1, 2, 3, 4, 5, 6, ...}. In other words, the numbers {m*n, m >= 1, n >= 1} sorted into nondecreasing order.
Considering the maximal rectangle in each of the Ferrers graphs of partitions of n, a(n) is the smallest such maximal rectangle; a(n) is also an inverse of A006218. - Henry Bottomley, Mar 11 2002
The numbers in A003991 arranged in numerical order. - Matthew Vandermast, Feb 28 2003
Least k such that tau(1) + tau(2) + tau(3) + ... + tau(k) >= n. - Michel Lagneau, Jan 04 2012
The number 1 appears only once, primes appear twice, squares of primes appear thrice. All other positive integers appear at least four times. - Alonso del Arte, Nov 24 2013

Examples

			Array begins:
   1
   2  2
   3  3
   4  4  4
   5  5
   6  6  6  6
   7  7
   8  8  8  8
   9  9  9
  10 10 10 10
  11 11
  12 12 12 12 12 12
  13 13
  14 14 14 14
  15 15 15 15
  16 16 16 16 16
  17 17
  18 18 18 18 18 18
  19 19
  20 20 20 20 20 20
  21 21 21 21
  22 22 22 22
  23 23
  24 24 24 24 24 24 24 24
		

Crossrefs

Cf. A000005. An inverse to A006218.

Programs

  • Maple
    with(numtheory); t1:=[]; for i from 1 to 1000 do for j from 1 to tau(i) do t1:=[op(t1),i]; od: od: t1:=sort(t1);
  • Mathematica
    Flatten[Table[Table[n, {Length[Divisors[n]]}], {n, 30}]]
  • PARI
    a(n)=if(n<0,0,t=1;while(sum(k=1,t,floor(t/k))Benoit Cloitre, Nov 08 2009

Formula

a(n) >= pi(n+1) for all n; a(n) >= pi(n) + 1 for all n >= 24 (cf. A098357, A088526, A006218, A052511). - N. J. A. Sloane, Oct 22 2008
a(n) = A027750(n) * A056538(n). - Charles Kusniec, Jan 21 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi^2/12 (A072691). - Amiram Eldar, Jan 14 2024

Extensions

More terms from Erich Friedman, Jun 01 2001

A112954 Number of numbers m such that phi(m) = n*tau(m), with phi=A000010 and tau=A000005.

Original entry on oeis.org

7, 9, 10, 9, 7, 17, 4, 17, 14, 15, 7, 19, 2, 16, 20, 21, 0, 29, 0, 29, 9, 13, 7, 32, 7, 11, 23, 21, 7, 39, 0, 19, 17, 4, 11, 44, 2, 0, 11, 41, 7, 24, 2, 19, 30, 11, 0, 55, 4, 23, 7, 21, 7, 46, 9, 27, 4, 11, 0, 61, 0, 0, 27, 29, 9, 30, 2, 10, 19, 31, 0, 57, 2, 9, 27, 4, 4, 30, 2, 50, 29, 9
Offset: 1

Views

Author

Reinhard Zumkeller, Oct 07 2005

Keywords

Crossrefs

Extensions

More terms from Max Alekseyev, Mar 01 2010

A248397 Noncongruent squarefree numbers n with A248394(n)/d(n) = 1, where d(n) = A000005(n).

Original entry on oeis.org

1, 3, 33, 51, 57, 59, 83, 139, 177, 187, 209, 211, 267, 321, 339, 345, 379, 385, 411, 451, 489, 499, 515, 555, 587, 595, 649, 659, 665, 681, 707, 803, 811, 827, 835, 899, 921, 969, 1001, 1059, 1099, 1137, 1171, 1211, 1219, 1235, 1259, 1267, 1281, 1315, 1329, 1363
Offset: 1

Views

Author

N. J. A. Sloane, Oct 20 2014

Keywords

Crossrefs

Extensions

More terms from Amiram Eldar, Oct 13 2019

A302051 An analog of A000005 for nonstandard factorization based on the sieve of Eratosthenes (A083221).

Original entry on oeis.org

1, 2, 2, 3, 2, 4, 2, 4, 3, 4, 2, 6, 2, 4, 4, 5, 2, 6, 2, 6, 4, 4, 2, 8, 3, 4, 4, 6, 2, 8, 2, 6, 6, 4, 4, 9, 2, 4, 4, 8, 2, 8, 2, 6, 5, 4, 2, 10, 3, 6, 6, 6, 2, 8, 4, 8, 6, 4, 2, 12, 2, 4, 4, 7, 4, 12, 2, 6, 8, 8, 2, 12, 2, 4, 4, 6, 4, 8, 2, 10, 6, 4, 2, 12, 6, 4, 8, 8, 2, 10, 4, 6, 6, 4, 4, 12, 2, 6, 4, 9, 2, 12, 2, 8, 9
Offset: 1

Views

Author

Antti Karttunen, Apr 01 2018

Keywords

Comments

See A302042, A302044 and A302045 for a description of the factorization process.

Crossrefs

Cf. A000005, A083221, A302042, A302044, A302045, A302052 (reduced modulo 2), A302053 (gives the positions of odd numbers).
Cf. also A253557, A302041, A302050, A302052, A302039, A302055 for other similar analogs.

Programs

  • PARI
    up_to = 65537;
    ordinal_transform(invec) = { my(om = Map(), outvec = vector(length(invec)), pt); for(i=1, length(invec), if(mapisdefined(om,invec[i]), pt = mapget(om, invec[i]), pt = 0); outvec[i] = (1+pt); mapput(om,invec[i],(1+pt))); outvec; };
    A020639(n) = if(n>1, if(n>n=factor(n, 0)[1, 1], n, factor(n)[1, 1]), 1); \\ From A020639
    v078898 = ordinal_transform(vector(up_to,n,A020639(n)));
    A078898(n) = v078898[n];
    A000265(n) = (n/2^valuation(n, 2));
    A001511(n) = 1+valuation(n,2);
    A302045(n) = A001511(A078898(n));
    A302044(n) = { my(c = A000265(A078898(n))); if(1==c,1,my(p = prime(-1+primepi(A020639(n))+primepi(A020639(c))), d = A078898(c), k=0); while(d, k++; if((1==k)||(A020639(k)>=p),d -= 1)); (k*p)); };
    A302051(n) = if(1==n,n,(A302045(n)+1)*A302051(A302044(n)));
    
  • PARI
    \\ Or, using also some of the code from above:
    A003961(n) = my(f = factor(n)); for (i=1, #f~, f[i, 1] = nextprime(f[i, 1]+1)); factorback(f); \\ From A003961
    A055396(n) = if(1==n,0,primepi(A020639(n)));
    A250246(n) = if(1==n,n,my(k = 2*A250246(A078898(n)), r = A055396(n)); if(1==r, k, while(r>1, k = A003961(k); r--); (k)));
    A302051(n) = numdiv(A250246(n));

Formula

a(1) = 1, for n > 1, a(n) = (A302045(n)+1) * a(A302044(n)).
a(n) = A000005(A250246(n)).
a(n) = A106737(A252754(n)).
Previous Showing 41-50 of 5121 results. Next