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

A261104 a(0)=0; for n >= 1, a(n) = 1 + a(n-A070319(n)), where A070319(n) is the maximum value for A000005 (number of divisors) in range 1 .. n.

Original entry on oeis.org

0, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 4, 3, 4, 4, 4, 4, 5, 4, 5, 5, 5, 5, 6, 5, 6, 5, 6, 6, 6, 6, 7, 6, 7, 6, 7, 7, 7, 7, 7, 8, 7, 8, 7, 8, 8, 8, 8, 8, 8, 9, 8, 9, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 9, 10, 9, 10, 10, 10, 10, 10, 10, 10, 10, 11, 10, 11, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 11, 12, 11, 12, 12, 12, 12, 12, 12, 12, 12, 13, 12, 13, 12, 13, 13, 13, 13, 13, 13, 13, 13, 14, 13, 14, 13, 14, 14, 14, 14, 14, 14, 14, 14
Offset: 0

Views

Author

Antti Karttunen, Sep 24 2015

Keywords

Comments

Number of steps needed to reach zero when starting from k = n and repeatedly applying the map that replaces k by k - A070319(k), where A070319(k) is the maximum value for A000005 (number of divisors) in range 1 .. k.

Crossrefs

Cf. A262502 (positions of records).

Formula

a(0)=0; for n >= 1, a(n) = 1 + a(n-A070319(n)).
Other identities. For all n >= 0:
a(A262502(n)) = n.

A002183 Number of divisors of n-th highly composite number.

Original entry on oeis.org

1, 2, 3, 4, 6, 8, 9, 10, 12, 16, 18, 20, 24, 30, 32, 36, 40, 48, 60, 64, 72, 80, 84, 90, 96, 100, 108, 120, 128, 144, 160, 168, 180, 192, 200, 216, 224, 240, 256, 288, 320, 336, 360, 384, 400, 432, 448, 480, 504, 512, 576, 600, 640, 672, 720, 768, 800, 864, 896
Offset: 1

Views

Author

Keywords

Comments

Record values of tau(n).
RECORDS transform of A000005.
All powers of 2 are present through 2^17. No power of 2 above that is present at least through 2^51. - Comment from Robert G. Wilson v, modified by Ray Chandler, Nov 10 2005
No power of 2 above 2^17 is contained in this sequence - see McRae link for proof. - Graeme McRae, Apr 27 2006
All numbers of the form 9*2^n are present for n=0 through n=30. - Richard Peterson, Sep 07 2024

References

  • S. Ramanujan, Collected Papers, Ed. G. H. Hardy et al., Cambridge 1927; Chelsea, NY, 1962, p. 87.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Programs

  • Haskell
    import Data.List (nub)
    a002183 n = a002183_list !! (n-1)
    a002183_list = nub $ map (a000005 . a061799) [1..]
    -- Reinhard Zumkeller, Apr 01 2011
  • Mathematica
    Reap[ For[ record = 0; n = 1, n <= 10^9, n = If[n < 60, n+1, n+60], tau = DivisorSigma[0, n]; If[tau > record, record = tau; Print[tau]; Sow[tau]]]][[2, 1]] (* Jean-François Alcover, Aug 13 2013 *)
    DeleteDuplicates[DivisorSigma[0,Range[3*10^6]],GreaterEqual] (* The program generates the first 42 terms of the sequence. *) (* Harvey P. Dale, Aug 12 2025 *)

Formula

a(n) = A000005(A002182(n)).
Also record values of differences A006218(p)-A006218(p-1). These record values occur for any p = A002182(q) where q>=2. - Philippe LALLOUET (philip.lallouet(AT)wanadoo.fr), Jun 23 2007
a(A261100(n)) = A070319(n). - Antti Karttunen, Jun 06 2017
a(n) = A329605(A329902(n)). - Antti Karttunen, Jan 14 2020

Extensions

More terms from Robert G. Wilson v, Jul 24 2002

A045765 k - d(k) never takes these values, where d(k) = A000005(k).

Original entry on oeis.org

7, 8, 13, 19, 20, 24, 25, 28, 33, 36, 37, 40, 43, 49, 50, 52, 55, 56, 63, 64, 66, 67, 68, 74, 75, 79, 85, 88, 98, 100, 103, 108, 109, 112, 113, 116, 117, 123, 124, 126, 131, 132, 133, 134, 136, 140, 143, 145, 150, 153, 156, 159, 160, 163, 164, 167, 168
Offset: 1

Views

Author

Keywords

Comments

Complement of A236562. - Jaroslav Krizek, Feb 09 2014
Positions of zeros in A060990, leaf-nodes in the tree generated by edge-relation A049820(child) = parent. - Antti Karttunen, Oct 06 2015
Since A000005(x) <= 1 + x/2, k is in the sequence if there are no x <= 2*(k+1) with k = x - d(x). - Robert Israel, Oct 12 2015
This can be improved as: k is in the sequence if there are no x <= k + A002183(2+A261100(k)) with k = x - d(x). Cf. also A070319, A262686. - Antti Karttunen, Oct 12 2015
Luca (2005) proved that this seqeunce is infinite. - Amiram Eldar, Jul 26 2025

Crossrefs

Top row of A262898.
Cf. A263091 (primes in this sequence), A263095 (squares).
Cf. A259934 (gives the infinite trunk of the same tree, conjectured to be unique).

Programs

  • Maple
    N:= 1000: # to get all terms <= N
    sort(convert({$1..N} minus {seq(x - numtheory:-tau(x), x=1..2*(1+N))},list)); # Robert Israel, Oct 12 2015
  • Mathematica
    lim = 10000; Take[Complement[Range@ lim, Sort@ DeleteDuplicates@ Table[n - DivisorSigma[0, n], {n, lim}]], 57] (* Michael De Vlieger, Oct 13 2015 *)
  • PARI
    allocatemem((2^31)+(2^30));
    uplim = 36756720 + 640; \\ = A002182(53) + A002183(53).
    v060990 = vector(uplim);
    for(n=3, uplim, v060990[n-numdiv(n)]++);
    A060990 = n -> if(!n,2,v060990[n]);
    uplim2 = 36756720;
    n=0; k=1; while(n <= uplim2, if(0==A060990(n), write("b045765_big.txt", k, " ", n); k++); n++;);
    \\ Antti Karttunen, Oct 09 2015
    
  • Scheme
    (define A045765 (ZERO-POS 1 1 A060990))
    ;; Using also IntSeq-library of Antti Karttunen, Oct 06 2015

A262509 Numbers n such that there is no other number k for which A155043(k) = A155043(n).

Original entry on oeis.org

0, 119143, 119147, 119163, 119225, 119227, 119921, 119923, 120081, 120095, 120097, 120101, 120281, 120293, 120349, 120399, 120707, 120747, 120891, 120895, 120903, 120917, 120919, 121443, 121551, 121823, 122079, 122261, 122263, 122273, 122277, 122813, 122961, 123205, 123213, 123223, 123237, 123257, 123765, 24660543, 24660549, 24662311, 24662329, 24663759, 24664997, 24665023, 24665351
Offset: 0

Views

Author

Antti Karttunen, Sep 25 2015

Keywords

Comments

Starting offset is zero, because a(0) = 0 is a special case in this sequence.
Numbers where A155043 takes a unique value. (Those values are given by A262508.)
Numbers n such that there does not exist any other number h from which one could reach zero in exactly the same number of steps as from n by repeatedly applying the map where k is replaced by k - A000005(k) = A049820(k). Thus in the tree where zero is the root and parent-child relation is given by A049820(child) = parent, all the numbers > n+t (where t is a small value depending on n) have n as their common ancestor. As it is guaranteed that there is at least one infinite path in such a tree, any n in this sequence can be neither a leaf nor any other vertex in a finite side-tree, as then at least one node in the infinite part would have the same distance to the root, thus it must be that n itself is in the infinite part and thus has an infinite number of descendant vertices. Also, for the same reason, the tree cannot branch to two infinite parts from any ancestor of n (which are nodes nearer to the root of the tree, zero).
From the above it follows that if this sequence is infinite, then A259934 is guaranteed to be the only infinite sequence which starts with a(0)=0 and satisfies the condition A049820(a(k)) = a(k-1) for all k>=1, where A049820(n) = n-d(n) and d(n) is the number of divisors of n (A000005). This is a sufficient condition for the uniqueness of A259934, although not necessary. See e.g. A179016 which is the unique infinite solution to a similar problem, even though A086876 contains no ones after its two initial terms.
Is it possible for any even terms to occur after zero? If not, then apart from zero, this would be a subsequence of A262517.

Crossrefs

Subsequence of A259934, A261089, A262503 and A262513.
Cf. A262510 (gives the parent nodes for the terms a(1) onward), A262514, A262516, A262517.
Cf. also A086876, A179016.

Programs

  • PARI
    \\ Compute A262508 and A262509 at the same time:
    allocatemem((2^31)+(2^30));
    \\ The limits used are quite ad hoc. Beware of the horizon-effect if you change these.
    \\ As a post-check, test that A262509(n) = A259934(A262508(n)) for all the terms produced by this program.
    uplim1 = 43243200 + 672; \\ = A002182(54) + A002183(54).
    uplim2 = 36756720; \\ = A002182(53).
    uplim3 = 10810800; \\
    v155043 = vector(uplim1);
    v262503 = vector(uplim3);
    v262507 = vector(uplim3);
    v155043[1] = 1; v155043[2] = 1;
    for(i=3, uplim1, v155043[i] = 1 + v155043[i-numdiv(i)]);
    A155043 = n -> if(!n,n,v155043[n]);
    for(i=1, uplim1, v262503[v155043[i]] = i; v262507[v155043[i]]++; if(!(i%1048576),print1(i,", ")));
    A262503 = n -> if(!n,n,v262503[n]);
    A262507 = n -> if(!n,1,v262507[n]);
    k=0; for(n=0, uplim3, if((1==A262507(n)) && (A262503(n) <= uplim2), write("b262508.txt", k, " ", n); write("b262509.txt", k, " ", A262503(n)); k++));
    
  • Scheme
    (define (A262509 n) (A261089 (A262508 n)))

Formula

a(n) = A261089(A262508(n)) = A262503(A262508(n)) = A259934(A262508(n)).

A261100 a(n) is the greatest m for which A002182(m) <= n; the least monotonic left inverse for highly composite numbers A002182.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Sep 24 2015

Keywords

Comments

Each n occurs A262501(n) times.
This is the only sequence w, which (1) satisfies w(A002182(n)) = n for all n >= 1 (thus is a left inverse of A002182), which (2) is monotonic (by necessity growing, although not strictly so), and which (3) is the lexicographically least of all sequences satisfying both (1) and (2). In other words, the largest number m for which A002182(m) <= n. - Antti Karttunen, Jun 06 2017

Crossrefs

Programs

  • Maple
    with(numtheory):
    A261100_list := proc(len) local n, k, j, b, A, tn: A := NULL; k := 0;
    for n from 1 to len do
        b := true; tn := tau(n);
        for j from 1 to n-1 while b do b := b and tau(j) < tn od:
        if b then k := k + 1 fi;
        A := A,k
    od: A end: A261100_list(120); # Peter Luschny, Jun 06 2017
  • Mathematica
    A002182 = Import["https://oeis.org/A002182/b002182.txt", "Table"];
    inter = Interpolation[Reverse /@ A002182, InterpolationOrder -> 0];
    A261100 = Rest[inter /@ Range[200]] - 1 (* Jean-François Alcover, Oct 25 2019 *)
  • PARI
    v002182 = vector(1000); v002182[1] = 1; \\ For memoization.
    A002182(n) = { my(d,k); if(v002182[n],v002182[n], k = A002182(n-1); d = numdiv(k); while(numdiv(k) <= d, k=k+1); v002182[n] = k; k); };
    A261100(n) = { my(k=1); while(A002182(k)<=n,k=k+1); (k-1); } \\ Antti Karttunen, Jun 06 2017
    
  • Scheme
    (define (A261100 n) (let loop ((k 1)) (if (> (A002182 k) n) (- k 1) (loop (+ 1 k)))))
    
  • Scheme
    ;; Requires Antti Karttunen's IntSeq-library.
    (define A261100 (LEFTINV-LEASTMONO 1 1 A002182))

Formula

a(n) = the least k for which A002182(k+1) > n.
Other identities. For all n >= 1:
a(A002182(n)) = n. [The least monotonic sequence satisfying this condition.]
A070319(n) = A002183(a(n)).

Extensions

Description clarified by Antti Karttunen, Jun 06 2017

A263098 a(n) = Max( tau(k) : k=1,2,3,...,n^2 ) where tau(k) = A000005(k) is the number of divisors of k.

Original entry on oeis.org

1, 3, 4, 6, 8, 9, 10, 12, 12, 12, 16, 16, 16, 18, 18, 20, 20, 20, 24, 24, 24, 24, 24, 24, 24, 24, 30, 30, 32, 32, 32, 32, 32, 32, 32, 36, 36, 36, 36, 36, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 60, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 72
Offset: 1

Views

Author

Antti Karttunen, Oct 10 2015

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Max[DivisorSigma[0, #] & /@ Range[n^2]], {n, 101}] (* Michael De Vlieger, Oct 11 2015 *)
  • PARI
    A070319(n, m=1, s=2)={for(k=s, n, mM. F. Hasler, Sep 12 2012
    A263098 = n -> A070319(n^2); \\ Slow without memoization.
    for(n=1, 2080, write("b263098.txt", n, " ", A263098(n)));
    
  • Scheme
    (define (A263098 n) (A070319 (A000290 n)))

Formula

a(n) = A070319(A000290(n)).

A068509 a(n) = maximum length of a subset in {1,..,n} whose integers have pairwise LCM not exceeding n.

Original entry on oeis.org

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

Views

Author

Naohiro Nomoto, Mar 12 2002

Keywords

Comments

Can be formulated as a maximum independent set problem and solved using integer linear programming: maximize Sum_{i=1..n} x(i) subject to x(i) + x(j) <= 1 for all i < j with lcm(i,j) > n, x(i) in {0,1} for all i. - Rob Pratt, Feb 08 2010
First differs from A070319 when n = 336, due to the set of 21 elements {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 21, 24, 30, 36, 42, 48} where each pair of elements has lcm <= 336, while no positive integer <= 336 has more than 20 divisors. Therefore A068509(336) = 21 and A070319(336) = 20. - William Rex Marshall, Sep 11 2012

References

  • R. K. Guy, Unsolved Problems in Number Theory, B26.

Formula

(3*sqrt(n))/(2*sqrt(2)) - 2 < a(n) <= 1.638*sqrt(n). - P. Erdos and S. L. G. Choi

Extensions

More terms from Rob Pratt, Feb 08 2010

A357898 a(n) is the least k such that phi(k) + d(k) = 2^n, or -1 if there is no such k, where phi(k) = A000010(k) is Euler's totient function and d(k) = A000005(k) is the number of divisors of k.

Original entry on oeis.org

1, 3, 7, 21, 31, 77, 127, 301, 783, 1133, 3399, 4781, 8191, 16637, 37367, 101601, 131071, 305837, 524287, 1073581, 3220743, 4201133, 8544103, 18404669, 34012327, 67139117, 135255431, 300528877, 824583699, 1073862029, 2147483647, 4295564381, 8603449703, 25807607829
Offset: 1

Views

Author

J. M. Bergot and Robert Israel, Oct 19 2022

Keywords

Comments

All primes in this sequence are primes of the form 2^n - 1. This is true because phi(p) = 2^n - 2 if p = 2^n - 1 is a Mersenne prime. - Thomas Scheuerle, Oct 19 2022
274878976349 = a(38) < a(37) = 274881227398. - Martin Ehrenstein, Oct 24 2022
d(k) <= A070319(2^n). - David A. Corneth, Oct 25 2022

Examples

			a(3) = 7 because phi(7)+d(7) = 6+2 = 2^3, and 7 is the least number that works.
		

Crossrefs

Programs

  • Maple
    V:= Array(0..23): count:= 0:
    for n from 1 while count < 23 do
      s:= phi(n)+tau(n);
      t:= padic:-ordp(s,2);
      if V[t] = 0 and s = 2^t then
         V[t]:= n; count:= count+1;
      fi
    od:
    convert(V,list)[2..-1];

Extensions

a(27)-a(33) from Giorgos Kalogeropoulos, Oct 22 2022
a(34) from Martin Ehrenstein, Oct 24 2022

A360461 T(n,k) is the sum of all the k-th smallest divisors of all positive integers <= n. Irregular triangle read by rows (n>=1, k>=1).

Original entry on oeis.org

1, 2, 2, 3, 5, 4, 7, 4, 5, 12, 4, 6, 14, 7, 6, 7, 21, 7, 6, 8, 23, 11, 14, 9, 26, 20, 14, 10, 28, 25, 24, 11, 39, 25, 24, 12, 41, 28, 28, 6, 12, 13, 54, 28, 28, 6, 12, 14, 56, 35, 42, 6, 12, 15, 59, 40, 57, 6, 12, 16, 61, 44, 65, 22, 12, 17, 78, 44, 65, 22, 12, 18, 80, 47, 71, 31, 30, 19, 99, 47, 71, 31, 30
Offset: 1

Views

Author

Omar E. Pol, Feb 07 2023

Keywords

Comments

Also, looking at all the partitions into equal-sized parts of all positive integers <= n, T(n,k) is the total number of parts in the partitions with the k-th largest parts.
Column k lists the partial sums of the column k of A027750.
The rows where the length row increases to a record gives A002182.

Examples

			Triangle begins:
   1;
   2,   2;
   3,   5;
   4,   7,  4;
   5,  12,  4;
   6,  14,  7,   6;
   7,  21,  7,   6;
   8,  23, 11,  14;
   9,  26, 20,  14;
  10,  28, 25,  24;
  11,  39, 25,  24;
  12,  41, 28,  28,  6, 12;
  ...
For n = 6 the divisors, in increasing order, of all positive integers <= 6 are as follows:
  -----------------------------
  n\k |    1     2     3     4
  -----------------------------
  1   |    1
  2   |    1,    2
  3   |    1,    3
  4   |    1,    2,    4
  5   |    1,    5
  6   |    1,    2,    3,    6
.
The sum of the first divisors (k = 1) is equal to 1+1+1+1+1+1 = 6, so T(6,1) = 6.
The sum of the second divisors (k = 2) is equal to 2+3+2+5+2 = 14, so T(6,2) = 14.
The sum of the third divisors (k = 3) is equal to 4+3 = 7, so T(6,3) = 7.
The sum of the fourth divisors (k = 4) is equal to 6, so T(6,4) = 6.
So the 6th row of the triangle is [6, 14, 7, 6].
Also, for n = 6 the partitions into equal parts, with the sizes of the parts in decreasing order, of all positive integers <= 6 are as follows:
  ----------------------------------------------------
  n\k |     1      2              3           4
  ----------------------------------------------------
  1   |    [1]
  2   |    [2],  [1,1]
  3   |    [3],  [1,1,1]
  4   |    [4],  [2,2],       [1,1,1,1]
  5   |    [5],  [1,1,1,1,1]
  6   |    [6],  [3,3],       [2,2,2],   [1,1,1,1,1,1]
.
The total number of parts in the 1st partitions (k = 1) is 6, so T(6,1) = 6.
The total number of parts in the 2nd partitions (k = 2) is 14, so T(6,2) = 14.
The total number of parts in the 3rd partitions (k = 3) is 7, so T(6,3) = 7.
The total number of parts in the 4th partitions (k = 4) is 6, so T(6,4) = 6.
So the 6th row of the triangle is [6, 14, 7, 6].
		

Crossrefs

Row sums give A024916.
Row lengths give A070319.
Column 1 gives A000027.
Column 2 gives A088821.
The sum of the first n rows gives A175254.
Main sequences: A027750 and A244051.

Programs

Showing 1-9 of 9 results.