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 10 results.

A262681 Odd bisection of A262680.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 1, 1, 3, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 3, 3, 3, 1
Offset: 0

Views

Author

Antti Karttunen, Oct 03 2015

Keywords

Comments

Number of perfect squares (A000290) encountered before zero is reached when starting from k = 2n+1 and repeatedly applying the map that replaces k by k - d(k), where d(k) is the number of divisors of k (A000005). This count includes n itself if it is a square, but excludes the zero.

Crossrefs

Programs

Formula

a(n) = A262680((2*n)+1).

A262682 Even bisection of A262680.

Original entry on oeis.org

0, 0, 2, 0, 2, 0, 0, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 4, 2
Offset: 0

Views

Author

Antti Karttunen, Oct 03 2015

Keywords

Comments

Number of perfect squares (A000290) encountered before zero is reached when starting from k = 2n and repeatedly applying the map that replaces k by k - d(k), where d(k) is the number of divisors of k (A000005). This count includes n itself if it is a square, but excludes the zero.

Crossrefs

Programs

Formula

a(n) = A262680(2*n).

A262687 a(n) = index of first n in A262680; positions of records in A262680.

Original entry on oeis.org

0, 1, 4, 169, 324, 1521, 125316, 126025, 425104, 1713481, 1716100, 4959529, 24760576
Offset: 0

Views

Author

Antti Karttunen, Oct 03 2015

Keywords

Comments

All terms are squares (A262688 gives the square roots).
The even and odd terms alternate.

Crossrefs

Cf. A262688 (square roots of these terms).

Programs

  • PARI
    allocatemem((2^31)+(2^30));
    uplim = 2^25;
    v262680 = vector(uplim);
    v262680[1] = 1; v262680[2] = 0;
    for(i=3, uplim, v262680[i] = issquare(i) + v262680[i-numdiv(i)];
    if(!(i%65536),print1(i,", ")););
    A262680 = n -> if(!n,n,v262680[n]);
    n=0; k=0; while(n*n <= uplim, if(A262680(n*n)==k, write("b262687.txt", k, " ", n*n); k++); n++;);
    
  • Scheme
    ;; With Antti Karttunen's IntSeq-library.
    (define A262687 (RECORD-POS 0 0 A262680))

A262688 a(n) = square root of the index where A262680 reaches n for the first time.

Original entry on oeis.org

0, 1, 2, 13, 18, 39, 354, 355, 652, 1309, 1310, 2227, 4976
Offset: 0

Views

Author

Antti Karttunen, Oct 03 2015

Keywords

Comments

Natural numbers whose squares set new records for A262680.
Even and odd terms alternate.

Crossrefs

Programs

Formula

a(n) = A000196(A262687(n)).

A049820 a(n) = n - d(n), where d(n) is the number of divisors of n (A000005).

Original entry on oeis.org

0, 0, 1, 1, 3, 2, 5, 4, 6, 6, 9, 6, 11, 10, 11, 11, 15, 12, 17, 14, 17, 18, 21, 16, 22, 22, 23, 22, 27, 22, 29, 26, 29, 30, 31, 27, 35, 34, 35, 32, 39, 34, 41, 38, 39, 42, 45, 38, 46, 44, 47, 46, 51, 46, 51, 48, 53, 54, 57, 48, 59, 58, 57, 57, 61, 58, 65
Offset: 1

Views

Author

Keywords

Comments

a(n) is the number of non-divisors of n in 1..n. - Jaroslav Krizek, Nov 14 2009
Also equal to the number of partitions p of n such that max(p)-min(p) = 1. The number of partitions of n with max(p)-min(p) <= 1 is n; there is one with k parts for each 1 <= k <= n. max(p)-min(p) = 0 iff k divides n, leaving n-d(n) with a difference of 1. It is easiest to see this by looking at fixed k with increasing n: for k=3, starting with n=3 the partitions are [1,1,1], [2,1,1], [2,2,1], [2,2,2], [3,2,2], etc. - Giovanni Resta, Feb 06 2006 and Franklin T. Adams-Watters, Jan 30 2011
Number of positive numbers in n-th row of array T given by A049816.
Number of proper non-divisors of n. - Omar E. Pol, May 25 2010
a(n+2) is the sum of the n-th antidiagonal of A225145. - Richard R. Forberg, May 02 2013
For n > 2, number of nonzero terms in n-th row of triangle A051778. - Reinhard Zumkeller, Dec 03 2014
Number of partitions of n of the form [j,j,...,j,i] (j > i). Example: a(7)=5 because we have [6,1], [5,2], [4,3], [3,3,1], and [2,2,2,1]. - Emeric Deutsch, Sep 22 2016

Examples

			a(7) = 5; the 5 non-divisors of 7 in 1..7 are 2, 3, 4, 5, and 6.
The 5 partitions of 7 with max(p) - min(p) = 1 are [4,3], [3,2,2], [2,2,2,1], [2,2,1,1,1] and [2,1,1,1,1,1]. - _Emeric Deutsch_, Mar 01 2006
		

Crossrefs

Cf. A000005.
One less than A062968, two less than A059292.
Cf. A161664 (partial sums).
Cf. A060990 (number of solutions to a(x) = n).
Cf. A045765 (numbers not occurring in this sequence).
Cf. A236561 (same sequence sorted into ascending order), A236562 (with also duplicates removed), A236565, A262901 and A262903.
Cf. A262511 (numbers that occur only once).
Cf. A055927 (positions of repeated terms).
Cf. A245388 (positions of squares).
Cf. A155043 (number of steps needed to reach zero when iterating a(n)), A262680 (number of nonzero squares encountered).
Cf. A259934 (an infinite trunk of the tree defined by edge-relation a(child) = parent, conjectured to be unique).
Cf. tables and arrays A047916, A051731, A051778, A173540, A173541.
Cf. also arrays A225145, A262898, A263255 and tables A263265, A263267.

Programs

Formula

a(n) = Sum_{k=1..n} ceiling(n/k)-floor(n/k). - Benoit Cloitre, May 11 2003
G.f.: Sum_{k>0} x^(2*k+1)/(1-x^k)/(1-x^(k+1)). - Emeric Deutsch, Mar 01 2006
a(n) = A006590(n) - A006218(n) = A161886(n) - A000005(n) - A006218(n) + 1 for n >= 1. - Jaroslav Krizek, Nov 14 2009
a(n) = Sum_{k=1..n} A000007(A051731(n,k)). - Reinhard Zumkeller, Mar 09 2010
a(n) = A076627(n) / A000005(n). - Reinhard Zumkeller, Feb 06 2012
For n >= 2, a(n) = A094181(n) / A051953(n). - Antti Karttunen, Nov 27 2015
a(n) = Sum_{k=1..n} ((n mod k) + (-n mod k))/k. - Wesley Ivan Hurt, Dec 28 2015
G.f.: Sum_{j>=2} (x^(j+1)*(1-x^(j-1))/(1-x^j))/(1-x). - Emeric Deutsch, Sep 22 2016
Dirichlet g.f.: zeta(s-1)- zeta(s)^2. - Ilya Gutkovskiy, Apr 12 2017
a(n) = Sum_{i=1..n-1} sign(i mod n-i). - Wesley Ivan Hurt, Sep 27 2018

Extensions

Edited by Franklin T. Adams-Watters, Jan 30 2012

A259934 Infinite sequence starting with a(0)=0 such that A049820(a(k)) = a(k-1) for all k>=1, where A049820(n) = n - (number of divisors of n).

Original entry on oeis.org

0, 2, 6, 12, 18, 22, 30, 34, 42, 46, 54, 58, 62, 70, 78, 90, 94, 102, 106, 114, 118, 121, 125, 129, 144, 152, 162, 166, 174, 182, 190, 194, 210, 214, 222, 230, 236, 242, 250, 254, 270, 274, 282, 294, 298, 302, 310, 314, 330, 342, 346, 354, 358, 366, 374, 390, 394, 402, 410, 418, 426, 434, 442, 446, 462, 466, 474, 486, 494, 510, 522, 530, 546, 558, 562, 566, 574, 582, 590
Offset: 0

Views

Author

Max Alekseyev, Jul 09 2015

Keywords

Comments

Equivalently, satisfies the property: A000005(a(n)) = a(n)-a(n-1). The first differences a(n)-a(n-1) are given in A259935.
V. S. Guba (2015) proved that such an infinite sequence exists. Numerical evidence suggests that it may also be unique -- is it? All terms below 10^10 are defined uniquely.
If the current definition does not uniquely define the sequence, the "lexicographically earliest" condition may be added to make the sequence well-defined.
From Vladimir Shevelev, Jul 21 2015: (Start)
If a(k), a(k+1), a(k+2) is an arithmetic progression, then a(k+1) is in A175304.
Indeed, by the definition of this sequence, a(n)-a(n-1) = d(a(n)), for all n>=1, where d(n) = A000005(n). Hence, have a(k+1) - a(k) = a(k+2) - a(k+1) = d(a(k+1)) = d(a(k+2)). So a(k+1) + d(a(k+2)) = a(k+2) and a(k+1) + d(a(k+1)) = a(k+2).
Therefore, d(a(k+1) + d(a(k+1))) = d(a(k+2))= d(a(k+1)), i.e., a(k+1) is in A175304. Thus, if there are infinitely many pairs of the same consecutive terms of A259935, then A175304 is infinite (see there my conjecture). (End)
From Antti Karttunen, Nov 27 2015: (Start)
If multiple apparently infinite branches would occur at some point of computing, then even if the "lexicographically earliest" condition were then added to the definition, it would not help us much (when computing the sequence), as we would still not know which of the said branches were truly infinite. [See also Max Alekseyev's latter Jul 9 2015 posting on SeqFan-list, where he notes the same thing.] Note that many of the derived sequences tacitly assume that the uniqueness-conjecture is true. See also comments at A262693 and A262896.
One sufficient (but not a necessary) condition for the uniqueness of this sequence is that the sequence A262509 has infinite number of terms. Please see further comments there.
The graph of sequence exhibits two markedly different slopes, depending on whether it is on the "fast lane" of A049820 (even numbers) or the "slow lane" [odd numbers, for example when traversing the 1356 odd terms from 123871 to 113569 at range a(9859) .. a(8504)]. See A263086/A263085 for the "average cumulative speed difference" between the lanes. In general, slow and fast lane stay separate, except when they terminate into one of the squares (A262514) that work as "exchange ramps", forcing the parity (and thus the speed) to change. In average, the odd squares are slightly better than the even squares in attracting lanes going towards smaller numbers (compare A263253 to A263252). The cumulative effect of this bias is that the odd terms are much rarer in this sequence than the even terms (compare A263278 to A262516).
(End)

Crossrefs

Cf. A000005, A049820, A060990, A259935 (first differences).
Topmost row of A263255. Cf. also irregular tables A263267 & A263265 and array A262898.
Cf. A262693 (characteristic function).
Cf. A155043, A262694, A262904 (left inverses).
Cf. A262514 (squares present), A263276 (their positions), A263277.
Cf. A262517 (odd terms).
Cf. A262509, A262510, A262897 (other subsequences).
Cf. also A175304, A260257, A262680.
Cf. also A262679, A262896 (see the C++ program there).
No common terms with A045765 or A262903.
Positions of zeros in A262522, A262695, A262696, A262697, A263254.
Various metrics concerning finite side-trees: A262888, A262889, A262890.
Cf. also A262891, A262892 and A262895 (cf. its graph).
Cf. A260084, A260124 (variants).
Cf. also A179016 (a similar "beanstalk trunk sequence" but with more tractable and regular behavior).

Programs

Formula

From Antti Karttunen, Nov 27 2015: (Start)
Other identities and observations. For all n >= 0:
a(n) = A262679(A262896(n)).
A155043(a(n)) = A262694(a(n)) = A262904(a(n)) = n.
A261089(n) <= a(n) <= A262503(n). [A261103 and A262506 give the distances of a(n) to these bounds.]
(End)

A155043 a(0)=0; for n >= 1, a(n) = 1 + a(n-d(n)), where d(n) is the number of divisors of n (A000005).

Original entry on oeis.org

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

Views

Author

Ctibor O. Zizka, Jan 19 2009

Keywords

Comments

From Antti Karttunen, Sep 23 2015: (Start)
Number of steps needed to reach zero when starting from k = n and repeatedly applying the map that replaces k by k - d(k), where d(k) is the number of divisors of k (A000005).
The original name was: a(n) = 1 + a(n-sigma_0(n)), a(0)=0, sigma_0(n) number of divisors of n.
(End)

Crossrefs

Sum of A262676 and A262677.
Cf. A261089 (positions of records, i.e., the first occurrence of n), A262503 (the last occurrence), A262505 (their difference), A263082.
Cf. A262518, A262519 (bisections, compare their scatter plots), A262521 (where the latter is less than the former).
Cf. A261085 (computed for primes), A261088 (for squares).
Cf. A262507 (number of times n occurs in total), A262508 (values occurring only once), A262509 (their indices).
Cf. A263265 (nonnegative integers arranged by the magnitude of a(n)).
Cf. also A004001, A005185.
Cf. A264893 (first differences), A264898 (where repeating values occur).

Programs

  • Haskell
    import Data.List (genericIndex)
    a155043 n = genericIndex a155043_list n
    a155043_list = 0 : map ((+ 1) . a155043) a049820_list
    -- Reinhard Zumkeller, Nov 27 2015
    
  • Maple
    with(numtheory): a := proc (n) if n = 0 then 0 else 1+a(n-tau(n)) end if end proc: seq(a(n), n = 0 .. 90); # Emeric Deutsch, Jan 26 2009
  • Mathematica
    a[0] = 0; a[n_] := a[n] = 1 + a[n - DivisorSigma[0, n]]; Table[a@n, {n, 0, 82}] (* Michael De Vlieger, Sep 24 2015 *)
  • PARI
    uplim = 110880; \\ = A002182(30).
    v155043 = vector(uplim);
    v155043[1] = 1; v155043[2] = 1;
    for(i=3, uplim, v155043[i] = 1 + v155043[i-numdiv(i)]);
    A155043 = n -> if(!n,n,v155043[n]);
    for(n=0, uplim, write("b155043.txt", n, " ", A155043(n)));
    \\ Antti Karttunen, Sep 23 2015
    
  • Python
    from sympy import divisor_count as d
    def a(n): return 0 if n==0 else 1 + a(n - d(n))
    print([a(n) for n in range(101)]) # Indranil Ghosh, Jun 03 2017
  • Scheme
    (definec (A155043 n) (if (zero? n) n (+ 1 (A155043 (A049820 n)))))
    ;; Antti Karttunen, Sep 23 2015
    

Formula

From Antti Karttunen, Sep 23 2015 & Nov 26 2015: (Start)
a(0) = 0; for n >= 1, a(n) = 1 + a(A049820(n)).
a(n) = A262676(n) + A262677(n). - Oct 03 2015.
Other identities. For all n >= 0:
a(A259934(n)) = a(A261089(n)) = a(A262503(n)) = n. [The sequence works as a left inverse for sequences A259934, A261089 and A262503.]
a(n) = A262904(n) + A263254(n).
a(n) = A263270(A263266(n)).
A263265(a(n), A263259(n)) = n.
(End)

Extensions

Extended by Emeric Deutsch, Jan 26 2009
Name edited by Antti Karttunen, Sep 23 2015

A262677 Number of odd numbers encountered when iterating A049820 starting from n: a(0) = 0 and for n >= 1, a(n) = A000035(n) + a(A049820(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 03 2015

Keywords

Comments

Number of odd numbers encountered before zero is reached when starting from k = n and repeatedly applying the map that replaces k by k - d(k), where d(k) is the number of divisors of k (A000005). This count includes n itself if it is odd.

Crossrefs

Formula

a(0) = 0; for n >= 1, a(n) = A000035(n) + a(A049820(n)).
Other identities. For all n >= 0:
A155043(n) = A262676(n) + a(n).

A262676 Number of nonzero even numbers encountered when iterating A049820 starting from n: a(0) = 0 and for n >= 1, a(n) = (1-A000035(n)) + a(A049820(n)).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Oct 03 2015

Keywords

Comments

Number of even numbers encountered before zero is reached when starting from k = n and repeatedly applying the map that replaces k by k - d(k), where d(k) is the number of divisors of k (A000005). This count includes n itself if it is even, but excludes the zero.

Crossrefs

Formula

a(0) = 0; for n >= 1, a(n) = (1-A000035(n)) + a(A049820(n)).
Other identities. For all n >= 0:
A155043(n) = a(n) + A262677(n).

A322987 Number of iterations of A049820(x) = x - A000005(x) needed to reach a square, when starting from x = n.

Original entry on oeis.org

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

Views

Author

Antti Karttunen, Jan 05 2019

Keywords

Crossrefs

Programs

  • PARI
    A322987(n) = if(issquare(n),0,1+A322987(n-numdiv(n)));
    
  • PARI
    A322987(n) = { for(j=0,oo,if(issquare(n),return(j)); n -= numdiv(n)); };

Formula

If A010052(n) == 1 [when n is in A000290], then a(n) = 0, otherwise a(n) = 1+a(A049820(n)).
a(n) <= A155043(n).
For n >= 83, a(2*n) = A322996(2*n)-1. [Note that 2*83 = 166 > 144 = A262514(2).]
Showing 1-10 of 10 results.