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

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

A064491 a(1) = 1, a(n+1) = a(n) + tau(a(n)), where tau(n) (A000005) is the number of divisors of n.

Original entry on oeis.org

1, 2, 4, 7, 9, 12, 18, 24, 32, 38, 42, 50, 56, 64, 71, 73, 75, 81, 86, 90, 102, 110, 118, 122, 126, 138, 146, 150, 162, 172, 178, 182, 190, 198, 210, 226, 230, 238, 246, 254, 258, 266, 274, 278, 282, 290, 298, 302, 306, 318, 326, 330, 346, 350, 362, 366, 374
Offset: 1

Views

Author

Klaus Strassburger (strass(AT)ddfi.uni-duesseldorf.de), Oct 04 2001

Keywords

Comments

a(n) = partial sums of A165930(n). [Jaroslav Krizek, Sep 30 2009]

References

  • Claudia Spiro, Problem proposed at West Coast Number Theory Meeting, 1977. [If you change the starting term, does the resulting sequence always join this one? Does the parity of terms change infinitely often?] - From N. J. A. Sloane, Jan 11 2013

Crossrefs

Programs

  • Haskell
    a064491 n = a064491_list !! (n-1)
    a064491_list = iterate a062249 1  -- Reinhard Zumkeller, Mar 29 2014
    
  • Mathematica
    a[n_] := a[n] = a[n - 1] + DivisorSigma[0, a[n - 1]]; a[1] = 1; Table[a[n], {n, 1, 57}] (* Jean-François Alcover, Oct 11 2012 *)
    NestList[#+DivisorSigma[0,#]&,1,60] (* Harvey P. Dale, Feb 05 2017 *)
  • PARI
    { for (n=1, 1000, if (n>1, a+=numdiv(a), a=1); write("b064491.txt", n, " ", a) ) } \\ Harry J. Smith, Sep 16 2009
    
  • Python
    from itertools import islice
    from sympy import divisor_count
    def A064491gen(): # generator of terms
        n = 1
        yield n
        while True:
            n += divisor_count(n)
            yield n
    A064491_list = list(islice(A064491gen(),20)) # Chai Wah Wu, Dec 13 2021

Formula

It seems likely that there exist constants c_1 and c_2 such that c_1*n*log(n) < a(n) < c_2*n*log(n) for all sufficiently large n. - Franklin T. Adams-Watters, Jun 25 2008
a(n+1) = A062249(a(n)). - Reinhard Zumkeller, Mar 29 2014

Extensions

Beginning of sequence corrected by T. D. Noe, Sep 13 2007

A152770 Sum of proper divisors minus the number of proper divisors of n: a(n) = sigma(n) - n - d(n) + 1.

Original entry on oeis.org

0, 0, 0, 1, 0, 3, 0, 4, 2, 5, 0, 11, 0, 7, 6, 11, 0, 16, 0, 17, 8, 11, 0, 29, 4, 13, 10, 23, 0, 35, 0, 26, 12, 17, 10, 47, 0, 19, 14, 43, 0, 47, 0, 35, 28, 23, 0, 67, 6, 38, 18, 41, 0, 59, 14, 57, 20, 29, 0, 97, 0, 31, 36, 57, 16, 71, 0, 53, 24, 67, 0, 112, 0, 37, 44, 59, 16, 83, 0, 97
Offset: 1

Views

Author

Omar E. Pol, Dec 12 2008

Keywords

Comments

Sum of divisors of n, minus the number of divisors of n, minus n, plus 1.
Also, sum of proper divisors of n, minus the number of divisors of n, plus 1.
Note that if a(n)>0 then n is a composite number (A002808), otherwise, n is a noncomposite number (A008578) also called prime number at the beginning of the 20th century.
Also, sum of divisors of n, minus the number of proper divisors of n, minus n.
a(A008578(n)) = 0 for all n>=1. - Robert G. Wilson v, Dec 14 2008

Crossrefs

Programs

  • Maple
    A152770 := proc(n)
            numtheory[sigma](n)-n-numtheory[tau](n)+1 ;
    end proc: # R. J. Mathar, Sep 28 2011
  • Mathematica
    f[n_] := DivisorSigma[1, n] - DivisorSigma[0, n] - n + 1; Array[f, 105] (* Robert G. Wilson v, Dec 14 2008 *)
  • PARI
    a(n)=sigma(n)-n-numdiv(n)+1 \\ Charles R Greathouse IV, Mar 09 2014

Formula

a(n) = A000203(n) - A000005(n) - n + 1 = A001065(n) - A000005(n) + 1 = A000203(n) - A062249(n) + 1 = A065608(n) - n + 1.
a(n) = A000203(n) - A032741(n) - n.
a(n) = A001065(n) - A032741(n).
a(n) = A158901(n) - n. - Juri-Stepan Gerasimov, Sep 12 2009
From Peter Bala Jan 22 2021: (Start)
G.f.: A(q) = Sum_{n >= 2} (n-1)*q^(2*n)/(1 - q^n) = Sum_{n >= 2} q^(2*n)/(1 - q^n)^2. Cf. A001065.
Faster converging series: A(q) = Sum_{n >= 1} q^(n*(n+1))*((n-1)*q^(3*n+2) - n*q^(2*n+1) + (2-n)*q^(n+1) + n - 1)/((1 - q^n)*(1 - q^(n+1))^2) - apply the operator t*d/dt to equation 1 in Arndt, then set t = q^2 and x = q. (End)

Extensions

More terms from Omar E. Pol and Robert G. Wilson v, Dec 14 2008
Definition clarified and edited by Omar E. Pol, Dec 21 2008

A175304 A positive integer n is included if d(n+d(n)) = d(n), where d(n) is the number of divisors of n.

Original entry on oeis.org

3, 5, 6, 10, 11, 12, 17, 22, 29, 34, 35, 41, 44, 51, 58, 59, 60, 65, 70, 71, 72, 82, 84, 87, 91, 92, 96, 101, 102, 107, 111, 115, 118, 119, 125, 128, 129, 130, 137, 141, 142, 147, 149, 155, 174, 179, 182, 183, 191, 197, 201, 202, 205, 209, 213, 214, 215, 217, 222
Offset: 1

Views

Author

Leroy Quet, Mar 24 2010

Keywords

Comments

The sequence contains the smaller member of every pair of twin primes (A001359) and all squarefree semiprimes m such that m+4 is also a squarefree semiprime (A255746). Can one prove that this is an infinite sequence? - Vladimir Shevelev, Jul 11 2015
The sequence does not contain perfect squares. Indeed, let a(m)=k^2. Then d(k^2+d(k^2)) = d(k^2). Note that d(k^2) is odd. On the other hand, it is known (A046522) that d(k^2)<2*k. Hence, (k+1)^2 - k^2 > d(k^2). Thus k^2Vladimir Shevelev, Feb 10 2017
If p is prime and t+1 is odd prime, then p^t is not in the sequence. Indeed, if d(p^t+t+1)=t+1, then p^t+t+1=q^t, where q is prime > p (if p^t+t+1= say q^l*r^m, then (l+1)*(m+1)=t+1 which is impossible by the condition). But q>=p+2 and p^t+t+1>=p^t+2*t*p^(t-1) or t+1>=2*t*p^(t-1) which trivially has only solution t=1; however, by the condition t>=2. - Vladimir Shevelev, Feb 18 2017
If an odd integer k is in this sequence, so is 2k. - Charlie Neder, Jan 14 2019

Examples

			10 is in the sequence because d(10)=4 and d(10+d(10))=d(14)=4. - _Emeric Deutsch_, Apr 08 2010
		

Crossrefs

Positions of zeros in A286530.

Programs

  • Maple
    with(numtheory): a := proc (n) if tau(n+tau(n)) = tau(n) then n else end if end proc: seq(a(n), n = 1 .. 230); # Emeric Deutsch, Apr 08 2010
  • Mathematica
    Select[Range@ 224, Function[n, DivisorSigma[0, n + #] == # &@ DivisorSigma[0, n]]](* Michael De Vlieger, Sep 27 2015 *)
    Position[#, 0][[All, 1]] &@ Table[DivisorSigma[0, n + DivisorSigma[0, n]] - DivisorSigma[0, n], {n, 222}] (* Michael De Vlieger, May 21 2017 *)
  • PARI
    is(n)=numdiv(n+n=numdiv(n))==n \\ M. F. Hasler, Sep 27 2015

Extensions

More terms from Emeric Deutsch, Apr 08 2010

A286529 a(n) = d(n+d(n)), where d(n) is the number of divisors of n (A000005).

Original entry on oeis.org

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

Views

Author

Antti Karttunen, May 21 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[DivisorSigma[0, n + DivisorSigma[0, n]], {n, 117}] (* Michael De Vlieger, May 21 2017 *)
  • PARI
    A286529(n) = numdiv(n+numdiv(n));
    
  • Python
    from sympy import divisor_count as d
    def a(n): return d(n + d(n)) # Indranil Ghosh, May 21 2017
  • Scheme
    (define (A286529 n) (A000005 (+ n (A000005 n))))
    

Formula

a(n) = A000005(A062249(n)) = A000005(n+A000005(n)).
Sum_{k=1..n} a(k) ~ D*n*log(n) + O(n*log(n)/log(log(n))), where D > 0 is a constant (conjectured with an error O(n) by Ivić, 1992; proven by Kátai, 2007). - Amiram Eldar, Jul 08 2020

A036434 Integers which cannot be written as k+tau(k) for some k.

Original entry on oeis.org

1, 3, 6, 8, 11, 16, 17, 20, 22, 23, 27, 29, 35, 36, 40, 41, 44, 46, 47, 53, 54, 57, 60, 65, 67, 68, 70, 76, 77, 79, 80, 83, 87, 88, 92, 93, 94, 100, 101, 106, 107, 114, 116, 117, 121, 125, 128, 131, 132, 134, 135, 140, 142, 148, 155, 156, 157, 158, 161, 164, 166
Offset: 1

Views

Author

Simon Colton (simonco(AT)cs.york.ac.uk)

Keywords

Comments

Invented by the HR concept formation program.
Indices of 0's in A036431. - Sean A. Irvine, Nov 01 2020

Examples

			None of 1,2,3,4,5,6,7 are such that k+tau(k)=8, so 8 is in the sequence.
		

Crossrefs

Programs

  • Mathematica
    m = 200; Complement[Range[m], Table[n + DivisorSigma[0, n], {n, 1, m}]] (* Amiram Eldar, Nov 10 2021 *)
  • PARI
    isok(n) = sum(k=1, n, k+numdiv(k) != n) == n; \\ Michel Marcus, Dec 08 2014

A037852 Number of normal subgroups of dihedral group with 2n elements.

Original entry on oeis.org

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

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 04 2001

Keywords

Comments

When n is an odd prime a(n) = 3.
Write D_{2n} as , then the subgroups are of the form for d|n or for d|n and 0 <= r < d. The normal subgroups are for d|n and for d|gcd(n,2) and 0 <= r < d. There are d(n) normal subgroups of the first type and sigma(gcd(n,2)) normal subgroups of the second type. - Jianing Song, Jul 21 2022

Examples

			a(4) = 6 since D_8 = <a, x | a^4 = x^2 = 1, x*a*x = a^(-1)> has 6 normal subgroups: {e}, {e,a^2}, {e,a,a^2,a^3}, {e,a^2,x,a^2*x}, {e,a^2,a*x,a^3*x} and D_8. The 4 subgroups {e,x}, {e,a*x}, {e,a^2*x} and {e,a^3*x} are not normal. - _Jianing Song_, Jul 21 2022
		

Crossrefs

Programs

  • PARI
    a(n) = numdiv(n) + 2 + (-1)^n \\ Michel Marcus, Jul 30 2013

Formula

a(n) = d(n) + 2 + (-1)^n. - Paul Boddington, Feb 02 2004
a(n) = A000005(n) + A176040(n). - Michel Marcus, Aug 19 2015

Extensions

More terms from Michel Marcus, Jul 30 2013

A286479 a(n) = A046523(n+A000005(n)).

Original entry on oeis.org

2, 4, 2, 2, 2, 6, 4, 12, 12, 6, 2, 12, 6, 12, 2, 6, 2, 24, 6, 6, 4, 6, 4, 32, 12, 30, 2, 6, 2, 6, 6, 6, 2, 6, 6, 12, 6, 30, 2, 48, 2, 12, 12, 12, 6, 12, 4, 6, 12, 24, 6, 6, 6, 6, 2, 64, 2, 6, 2, 72, 12, 30, 6, 2, 6, 6, 6, 6, 2, 30, 2, 60, 12, 30, 16, 6, 16, 6, 16, 60, 6, 6, 6, 96, 2, 60, 6, 96, 6, 30, 6, 12, 2, 12, 12, 72, 12, 24, 30, 2, 2, 30, 30, 48, 2, 30
Offset: 1

Views

Author

Antti Karttunen, May 21 2017

Keywords

Crossrefs

Programs

  • Mathematica
    Table[Times @@ MapIndexed[Prime[First[#2]]^#1 &, Sort[FactorInteger[n + DivisorSigma[0, n]][[All, -1]], Greater]], {n, 106}] (* Michael De Vlieger, May 21 2017 *)
  • PARI
    A046523(n) = { my(f=vecsort(factor(n)[, 2], , 4), p); prod(i=1, #f, (p=nextprime(p+1))^f[i]); };  \\ This function from Charles R Greathouse IV, Aug 17 2011
    A286479(n) = A046523(n+numdiv(n));
    for(n=1,10000,write("b286479.txt", n, " ", A286479(n)));
    
  • Python
    from sympy import factorint, divisor_count
    def P(n):
        f = factorint(n)
        return sorted([f[i] for i in f])
    def a046523(n):
        x=1
        while True:
            if P(n) == P(x): return x
            else: x+=1
    def a(n): return a046523(n + divisor_count(n)) # Indranil Ghosh, May 21 2017
  • Scheme
    (define (A286479 n) (A046523 (+ n (A000005 n))))
    

Formula

a(n) = A046523(A062249(n)) = A046523(n+A000005(n)).

A062553 Number of Abelian subgroups of the dihedral group with 2n elements.

Original entry on oeis.org

2, 5, 5, 9, 7, 13, 9, 16, 12, 19, 13, 24, 15, 25, 19, 29, 19, 33, 21, 36, 25, 37, 25, 44, 28, 43, 31, 48, 31, 53, 33, 54, 37, 55, 39, 63, 39, 61, 43, 68, 43, 71, 45, 72, 51, 73, 49, 82, 52, 81, 55, 84, 55, 89, 59, 92, 61, 91, 61, 102, 63, 97, 69, 103, 69, 107, 69, 108, 73
Offset: 1

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 02 2001

Keywords

Comments

The rank of the fundamental group with genus one of the D_2n; cobordism category in dimension 1+1, with D_2n the dihedral group of order 2n. - C. Segovia, Dec 05 2012

Crossrefs

Programs

  • Mathematica
    a[n_] := If[OddQ[n], n, 3n/2] + DivisorSigma[0, n];
    Array[a, 69] (* Jean-François Alcover, Feb 24 2019 *)

Formula

a(n) = n + tau(n) if n is odd, (3/2)*n + tau(n) if n is even, where tau(n) = the number of divisors of n (A000005).

Extensions

Formula and more terms from Vladeta Jovovic, Jul 05 2001

A062558 Number of nonisomorphic cyclic subgroups of dihedral group with 2n elements.

Original entry on oeis.org

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

Views

Author

Vladeta Jovovic, Jul 03 2001

Keywords

Crossrefs

Cf. A000005, A000045, A023645, A062249 (labeled case).
One more than A076984.

Programs

Formula

a(n) = A000005(n) + A000035(n) = tau(n)+(n mod 2), where tau(n) = the number of divisors of n.
Showing 1-10 of 18 results. Next