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

A027423 Number of divisors of n!.

Original entry on oeis.org

1, 1, 2, 4, 8, 16, 30, 60, 96, 160, 270, 540, 792, 1584, 2592, 4032, 5376, 10752, 14688, 29376, 41040, 60800, 96000, 192000, 242880, 340032, 532224, 677376, 917280, 1834560, 2332800, 4665600, 5529600, 7864320, 12165120, 16422912
Offset: 0

Views

Author

Glen Burch (gburch(AT)erols.com), Leroy Quet

Keywords

Comments

It appears that a(n+1)=2*a(n) if n is in A068499. - Benoit Cloitre, Sep 07 2002
Because a(0) = 1 and for all n > 0, 2*a(n) >= a(n+1), the sequence is a complete sequence. - Frank M Jackson, Aug 09 2013
Luca and Young prove that a(n) divides n! for n >= 6. - Michel Marcus, Nov 02 2017

Examples

			a(4) = 8 because 4!=24 has precisely eight distinct divisors: 1, 2, 3, 4, 6, 8, 12, 24.
		

Crossrefs

Cf. A000005, A000142, A062569, A131688, A161466 (divisors of 10!).

Programs

  • Haskell
    a027423 n = f 1 $ map (\p -> iterate (* p) p) a000040_list where
       f y ((pps@(p:_)):ppss)
         | p <= n = f (y * (sum (map (div n) $ takeWhile (<= n) pps) + 1)) ppss
         | otherwise = y
    -- Reinhard Zumkeller, Feb 27 2013
    (Python 3.8+)
    from math import prod
    from collections import Counter
    from sympy import factorint
    def A027423(n): return prod(e+1 for e in sum((Counter(factorint(i)) for i in range(2,n+1)),start=Counter()).values()) # Chai Wah Wu, Jun 25 2022
  • Maple
    A027423 := n -> numtheory[tau](n!);
  • Mathematica
    Table[ DivisorSigma[0, n! ], {n, 0, 35}]
  • PARI
    for(k=0,50,print1(numdiv(k!),", ")) \\ Jaume Oliver Lafont, Mar 09 2009
    
  • PARI
    a(n)=my(s=1,t,tt);forprime(p=2,n,t=tt=n\p; while(tt, t+=tt\=p); s*=t+1); s \\ Charles R Greathouse IV, Feb 08 2013
    

Formula

a(n) <= a(n+1) <= 2*a(n) - Benoit Cloitre, Sep 07 2002
From Avik Roy (avik_3.1416(AT)yahoo.co.in), Jan 28 2009: (Start)
Assume, p1,p2...pm are the prime numbers less than or equal to n.
Then, a(n) = Product_{i=1..m} (bi+1), where bk = Sum_{i=1..m} floor(n/pk^i).
For example, if n=5, p1=2,p2=3,p3=5;
b1=floor(5/2)+floor(5/2^2)+floor(5/2^3)+...=2+1+0+..=3 similarly, b2=b3=1;
Thus a(5)=(3+1)(1+1)(1+1)=16. (End)
a(n) = A000005(A000142(n)). - Michel Marcus, Sep 13 2014
a(n) ~ exp(c * n/log(n) + O(n/log(n)^2)), where c = A131688 (Erdős et al., 1996). - Amiram Eldar, Nov 07 2020

A337536 Numbers k for which there are only 2 bases b (2 and k+1) where the digits of k contain the digit b-1.

Original entry on oeis.org

2, 3, 4, 10, 36, 40, 82, 256
Offset: 1

Views

Author

Michel Marcus, Aug 31 2020

Keywords

Comments

These could be called "nine-free numbers".
From David A. Corneth, Aug 31 2020: (Start)
This sequence has density 0. Conjecture: this sequence is finite and full. a(9) > 10^100 if it exists.
Suppose we want to see if 22792 = 1011021011_3 is a term. Since it has a digit of 2 in base 3, we can see that it is not. The next number that does not have the digit 2 in base 3 is 1011100000_3 = 22842, so we can proceed from there. In a similar way we can skip numbers based on bases b > 3. (End)
All terms of this sequence increased by 1 (except a(2)=3) are prime. - François Marques, Aug 31 2020
From Devansh Singh, Sep 19 2020: (Start)
If n is one less than an odd prime and we are interested in bases 3 <= b <= n-1 such that n in base b contains the digit b-1, then divisor of b (except 1) -1 cannot be the last digit since divisor of b divides n+1, which is not possible as n+1 is an odd prime.
If the last digit is 1, then b is odd as 1 = 2-1 and 2 cannot divide b as n+1 is an odd prime.
If the last digit is 0, then b-1 is the last digit of n-1 in base b.
b <= n/2 for even n,b <= (n+1)/2 for odd n.
This sequence is equivalent to the existence of only one prime generating polynomial = F(x) (having positive integer coefficients >=0 and <=b-1 for F(b)) such that F(2) = p.
There is no other prime generating polynomial = G(x) (having positive integer coefficients >=0 and <= b-1 for G(b)) that generates p for 2 < x = b <= (p-1)/2.
(End)

Examples

			2 is a term because 2 = 10_2 = 2_3, so both have the digit b-1, and there are no other bases where this happens.
4 is a term because 4 = 100_2 = 4_5, so both have the digit b-1, and there are no other bases where this happens.
		

Crossrefs

Programs

  • PARI
    isok(n, b) = vecmax(digits(n, b)) == b-1;
    b(n) = if (n==1, return (1)); my(b=3); while(!isok(n, b), b++); b; \\ A337535
    is(n) = b(n) == n+1;
    
  • PARI
    \\ See Corneth link \\ David A. Corneth, Aug 31 2020

A076984 Number of Fibonacci numbers that are divisors of the n-th Fibonacci number.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Oct 25 2002

Keywords

Comments

a(A001605(n)) = 2; a(A105802(n)) = n.
It is well known that if k is a divisor of n then F(k) divides F(n). Hence if n has d divisors, one expects that a(n)=d. However because F(1)=F(2)=1, there is one fewer Fibonacci divisor when n is even. So for even n, a(n)=d-1. - T. D. Noe, Jan 18 2006

Examples

			n=12, A000045(12)=144: 5 of the 15 divisors of 144 are also Fibonacci numbers, a(12) = #{1, 2, 3, 8, 144} = 5.
		

Crossrefs

Programs

  • Maple
    with(combinat, fibonacci):a[1] := 1:for i from 2 to 229 do s := 0:for j from 2 to i do if((fibonacci(i) mod fibonacci(j))=0) then s := s+1:fi:od:a[i] := s:od:seq(a[l],l=2..229);
  • Mathematica
    Table[s=DivisorSigma[0, n]; If[OddQ[n], s, s-1], {n, 100}] (Noe)
  • PARI
    {a(n)=if(n<1, 0, numdiv(n)+n%2-1)} /* Michael Somos, Sep 03 2006 */
    
  • PARI
    {a(n)=if(n<1, 0, sumdiv(n,d, d!=2))} /* Michael Somos, Sep 03 2006 */

Formula

a(n) = A023645(n) + 1. - T. D. Noe, Jan 18 2006
a(n) = tau(n) - [n is even] = A000005(n) - A059841(n). Proof: gcd(Fib(m), Fib(n)) = Fib(gcd(m, n)) and Fib(2) = 1. - Olivier Wittenberg, following a conjecture of Ralf Stephan, Sep 28 2004
The number of divisors of n excluding 2.
a(2n) = A066660(n). a(2n-1) = A099774(n). - Michael Somos, Sep 03 2006
a(3*2^(Prime(n-1)-1)) = 2n + 1 for n > 3. a(3*2^A068499[n]) = 2n + 1, where A068499(n) = {1,2,3,4,6,10,12,16,18,...}. - Alexander Adamchuk, Sep 15 2006

Extensions

Corrected and extended by Sascha Kurz, Jan 26 2003
Edited by N. J. A. Sloane, Sep 14 2006. Some of the comments and formulas may need to be adjusted to reflect the new offset.

A105802 Smallest m such that the m-th Fibonacci number has exactly n divisors that are also Fibonacci numbers.

Original entry on oeis.org

1, 3, 6, 15, 12, 45, 24, 36, 48, 405, 60, 315, 192, 144, 120, 945, 180, 1575, 240, 576, 3072, 295245, 360, 1296, 12288, 900, 960, 25515, 720, 14175, 840, 9216, 196608, 5184, 1260, 17325, 786432, 36864, 1680, 31185, 2880, 127575, 15360, 3600, 99225
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 20 2005

Keywords

Comments

A076985(n) = A000045(a(n)); A076984(a(n)) = n.

Examples

			n=6: a(6) = 45, A076985(6) = A000045(45) = 1134903170,
A076984(45) = #{1,2,5,34,109441,1134903170} = #{fib(1),fib(2),fib(5),fib(9),fib(21),fib(45)} = 6.
		

Crossrefs

Cf. A068499.

Programs

  • Mathematica
    t=Table[s=DivisorSigma[0, n]; If[OddQ[n], s, s-1], {n, 1000000}]; lst={}; n=1; While[pos=Flatten[Position[t, n, 1, 1]]; Length[pos]>0, AppendTo[lst, pos[[1]]]; n++ ]; lst (Noe)

Formula

Conjecture: a(2k+1) = 3*2^(Prime[k-1]-1) for k>3. It appears that a(2k+1) = 3*2^k for k = {1,2,3,4,6,10,12,16,18,...} = A068499[n] Numbers n such that n! reduced modulo (n+1) is not zero. - Alexander Adamchuk, Sep 15 2006

Extensions

More terms from T. D. Noe, Jan 18 2006

A368548 Number of palindromic partitions of n.

Original entry on oeis.org

1, 2, 2, 2, 4, 2, 4, 4, 6, 2, 10, 2, 8, 10, 10, 2, 18, 2, 20, 16, 12, 2, 36, 12, 14, 24, 36, 2, 60, 2, 38, 34, 18, 46, 104, 2, 20, 46, 108, 2, 122, 2, 94, 148, 24, 2, 212, 58, 116, 76, 140, 2, 232, 164, 270, 94, 30, 2, 588, 2, 32, 372, 274, 280, 420, 2, 276
Offset: 1

Views

Author

Michel Marcus, Feb 06 2024

Keywords

Comments

For n>1, a(n) >= 2 as [n] and [1,1,..1] are both palindromic partitions. - Chai Wah Wu, Feb 07 2024

Examples

			For n=5, the palindromic partitions (as defined in Hemmer and Westrem) are [5], [2, 3], [1, 2, 2], [1, 1, 1, 1, 1]. - _Chai Wah Wu_, Feb 07 2024
		

Crossrefs

Cf. A068499 (a(n)=2, n>1).

Programs

  • Python
    from itertools import count
    from math import comb
    from collections import Counter
    from sympy.utilities.iterables import partitions
    from sympy import isprime
    def A368548(n):
        if n == 3 or (n>1 and isprime(n+1)): return 2
        c = 0
        for p in partitions(n):
            s, a = '', 1
            for d in sorted(Counter(p).elements()):
                s += '1'*(d-a)+'0'
                a = d
            if s[:-1] == s[-2::-1]:
                c += 1
        return c # Chai Wah Wu, Feb 06 2024
    
  • Python
    from math import comb
    from sympy import divisors
    def A368548(n): # faster program using formula
        x = sum(comb(d-2+((n+1)//d>>1),d-1) for d in divisors(n+1>>1,generator=True)) if n&1 else 0
        y = sum(comb((d-5>>1)+(n+1)//d,d-3>>1) for d in divisors((n+1)>>(~(n+1)&n).bit_length(),generator=True) if d>=3)<<1
        return x+y # Chai Wah Wu, Feb 08 2024

Formula

From Chai Wah Wu, Feb 08 2024: (Start)
Let x = 0 if n is even and x = Sum_{d|(n+1)/2} binomial(d-2+(n+1)/2d,d-1) if n is odd.
Let y = 2*Sum_{d|n+1, d>=3, and d is odd} binomial((d-5)/2+(n+1)/d,(d-3)/2).
Then a(n) = x+y.
a(n) = 2 if n>1 and n+1 is prime.
a(n) = (n+3)/2 if n>3 is odd and (n+1)/2 is prime.
a(2^n-1) = Sum_{i=0..n-1} binomial(2^i+2^(n-i-1)-2,2^i-1).
(End)

Extensions

a(41)-a(67) from Chai Wah Wu, Feb 06 2024

A166460 Numbers k such that k + (-1)^k is not prime.

Original entry on oeis.org

0, 1, 5, 7, 8, 9, 11, 13, 14, 15, 17, 19, 20, 21, 23, 24, 25, 26, 27, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 43, 44, 45, 47, 48, 49, 50, 51, 53, 54, 55, 56, 57, 59, 61, 62, 63, 64, 65, 67, 68, 69, 71, 73, 74, 75, 76, 77, 79, 80, 81, 83, 84, 85, 86, 87, 89, 90, 91, 92, 93, 94
Offset: 1

Views

Author

Juri-Stepan Gerasimov, Oct 14 2009

Keywords

Comments

This is the complement of A068499 (except that both include 1 as a term).
From Don Reble, Aug 31 2021: (Start)
Proof for all k except 0, 1, 3 with cases
(i) If k is odd and >=5, then k+1 = 2*x, 2 < x < k, k! = k*...*x*...*2*1
A068499: k+1 divides k! : absent
A166460: k-1 is even and composite : present
(ii) If k is even and k+1 is prime,
A068499: k+1 does not divide k! : present
A166460: k+1 is prime : absent
(iii) If k is even and k+1 = p^2 is the square of a (odd) prime, then k+1 >= 3p, k > 2p.
A068499: k! = k*...*2p*...*p*...*1;
k+1 divides k! : absent
A166460: k+1 is composite : present
(iv) If k is even and k+1 is composite but not the square of a prime, then there are two distinct factors x*y = k+1:
3 <= x < y = (k+1)/x < k.
A068499: k! = k*...*y*...*x*...*1:
k+1 divides k! : absent
A166460: k+1 is composite : present
(End)

Examples

			0 + (-1)^0 = 1 is not prime, which adds 0 to the sequence.
5 + (-1)^5 = 4 is not prime, which adds 5 to the sequence.
		

Crossrefs

Programs

  • Mathematica
    Select[Range[0, 94], ! PrimeQ[# + (-1)^#] &] (* Michael De Vlieger, Sep 08 2021 *)
  • Python
    from sympy import composite
    def A166460(n): return composite(n-1)-1 if n>2 else n-1 # Chai Wah Wu, Aug 27 2024

Formula

a(n) = A002808(n-1)-1 for n>2. - Chai Wah Wu, Aug 27 2024

Extensions

0 added by R. J. Mathar, Oct 21 2009

A071637 Largest exponent k >=0 such that (n+1)^k divides n!.

Original entry on oeis.org

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

Views

Author

Benoit Cloitre, Jun 25 2002

Keywords

Comments

a(A068499(n)) = 0.

Examples

			12^4 divides 11! (11!/12^4=1925) but 12^5 doesn't, hence a(11)=4.
		

Crossrefs

A011776(n+1) - 1.

Programs

  • Mathematica
    Table[IntegerExponent[n!,n+1],{n,500}] (* Vladimir Joseph Stephan Orlovsky, Dec 26 2010 *)
  • PARI
    for(n=1,150,s=0; while(n!%(n+1)^s==0,s++); print1(s-1,","))
Showing 1-7 of 7 results.