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

A022998 If n is odd then n, otherwise 2n.

Original entry on oeis.org

0, 1, 4, 3, 8, 5, 12, 7, 16, 9, 20, 11, 24, 13, 28, 15, 32, 17, 36, 19, 40, 21, 44, 23, 48, 25, 52, 27, 56, 29, 60, 31, 64, 33, 68, 35, 72, 37, 76, 39, 80, 41, 84, 43, 88, 45, 92, 47, 96, 49, 100, 51, 104, 53, 108, 55, 112, 57, 116, 59, 120, 61, 124, 63, 128, 65, 132, 67
Offset: 0

Views

Author

Keywords

Comments

Also for n > 0: numerator of Sum_{i=1..n} 2/(i*(i+1)), denominator=A026741. - Reinhard Zumkeller, Jul 25 2002
For n > 2: a(n) = gcd(A143051((n-1)^2), A143051(1+(n-1)^2)) = A050873(A000290(n-1), A002522(n-1)). - Reinhard Zumkeller, Jul 20 2008
Partial sums give the generalized octagonal numbers A001082. - Omar E. Pol, Sep 10 2011
Multiples of 4 and odd numbers interleaved. - Omar E. Pol, Sep 25 2011
The Pisano period lengths modulo m appear to be A066043(m). - R. J. Mathar, Oct 08 2011
The partial sums a(n)/A026741(n+1) given by R. Zumkeller in a comment above are 2*n/(n+1) (telescopic sum), and thus converge to 2. - Wolfdieter Lang, Apr 09 2013
a(n) = numerator(H(n,1)), where H(n,1) = 2*n/(n+1) is the harmonic mean of 1 and n. a(n) = 2*n/gcd(2n, n+1) = 2*n/gcd(n+1,2). a(n) = A227041(n,1), n>=1. - Wolfdieter Lang, Jul 04 2013
a(n) = numerator of the mean (2n/(n+1), after reduction), of the compositions of n; denominator is given by A001792(n-1). - Clark Kimberling, Mar 11 2014
A strong divisibility sequence, that is, gcd(a(n), a(m)) = a(gcd(n,m)) for all natural numbers n and m. The sequence of convergents of the 2-periodic continued fraction [0; 1, -4, 1, -4, ...] = 1/(1 - 1/(4 - 1/(1 - 1/(4 - ...)))) begins [0/1, 1/1, 4/3, 3/2, 8/5, 5/3, 12/7, ...]. The present sequence is the sequence of numerators. The sequence of denominators of the continued fraction convergents [1, 1, 3, 2, 5, 3, 7, ...] is A026741, also a strong divisibility sequence. Cf. A203976. - Peter Bala, May 19 2014
a(n) is also the length of the n-th line segment of a rectangular spiral on the infinite square grid. The vertices of the spiral are the generalized octagonal numbers. - Omar E. Pol, Jul 27 2018
a(n) is the number of petals of the Rhodonea curve r = a*cos(n*theta) or r = a*sin(n*theta). - Matt Westwood, Nov 19 2019

Crossrefs

Column 4 of A195151. - Omar E. Pol, Sep 25 2011
Cf. A000034, A001082 (partial sums).
Cf. A227041 (first column). - Wolfdieter Lang, Jul 04 2013
Row 2 of A349593. A385555, A385556, A385557, A385558, A385559, and A385560 are respectively rows 3, 4, 5-6, 7, 8, and 9-10.

Programs

  • Haskell
    a022998 n = a000034 (n + 1) * n
    a022998_list = zipWith (*) [0..] $ tail a000034_list
    -- Reinhard Zumkeller, Mar 31 2012
    
  • Magma
    [((-1)^n+3)*n/2: n in [0..70]]; // Vincenzo Librandi, Sep 17 2011
    
  • Maple
    A022998 := proc(n) if type(n,'odd') then n ; else 2*n; end if; end proc: # R. J. Mathar, Mar 10 2011
  • Mathematica
    Table[n (3 + (-1)^n)/2, {n, 0, 100}] (* Wesley Ivan Hurt, Dec 13 2013 *)
    Table[If[OddQ[n],n,2n],{n,0,150}] (* or *) Riffle[ 2*Range[ 0,150,2], Range[ 1,150,2]] (* Harvey P. Dale, Feb 06 2017 *)
  • PARI
    a(n)=if(n%2,n,2*n)
    
  • Python
    def A022998(n): return n if n&1 else n<<1 # Chai Wah Wu, Mar 05 2024
  • SageMath
    [n*(1+((n+1)%2)) for n in (0..80)] # G. C. Greubel, Jul 31 2022
    

Formula

Denominator of (n+1)*(n-1)*(2*n+1)/(2*n) (for n > 0).
a(n+1) = lcm(n, n+2)/n + lcm(n, n+2)/(n+2) for all n >= 1. - Asher Auel, Dec 15 2000
Multiplicative with a(2^e) = 2^(e+1), a(p^e) = p^e, p > 2.
G.f. x*(1 + 4*x + x^2)/(1-x^2)^2. - Ralf Stephan, Jun 10 2003
a(n) = 3*n/2 + n*(-1)^n/2 = n*(3 + (-1)^n)/2. - Paul Barry, Sep 04 2003
a(n) = A059029(n-1) + 1 = A043547(n+2) - 2.
a(n)*a(n+3) = -4 + a(n+1)*a(n+2).
a(n) = n*(((n+1) mod 2) + 1) = n^2 + 2*n - 2*n*floor((n+1)/2). - William A. Tedeschi, Feb 29 2008
a(n) = denominator((n+1)/(2*n)) for n >= 1; A026741(n+1) = numerator((n+1)/(2*n)) for n >= 1. - Johannes W. Meijer, Jun 18 2009
a(n) = 2*a(n-2) - a(n-4).
Dirichlet g.f. zeta(s-1)*(1+2^(1-s)). - R. J. Mathar, Mar 10 2011
a(n) = n * (2 - n mod 2) = n * A000034(n+1). - Reinhard Zumkeller, Mar 31 2012
a(n) = floor(2*n/(1 + (n mod 2))). - Wesley Ivan Hurt, Dec 13 2013
From Ilya Gutkovskiy, Mar 16 2017: (Start)
E.g.f.: x*(2*sinh(x) + cosh(x)).
It appears that a(n) is the period of the sequence k*(k + 1)/2 mod n. (End) [This is correct; see A349593. - Jianing Song, Jul 03 2025]
a(n) = Sum_{d | n} A345082(d). - Peter Bala, Jan 13 2024

Extensions

More terms from Michael Somos, Aug 07 2000

A062383 a(0) = 1: for n>0, a(n) = 2^floor(log_2(n)+1) or a(n) = 2*a(floor(n/2)).

Original entry on oeis.org

1, 2, 4, 4, 8, 8, 8, 8, 16, 16, 16, 16, 16, 16, 16, 16, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 128, 128, 128, 128, 128, 128
Offset: 0

Views

Author

Antti Karttunen, Jun 19 2001

Keywords

Comments

Informally, write down 1 followed by 2^k 2^(k-1) times, for k = 1,2,3,4,... These are the denominators of the binary van der Corput sequence (see A030101 for the numerators). - N. J. A. Sloane, Dec 01 2019
a(n) is the denominator of the form 2^k needed to make the ratio (2n-1)/2^k lie in the interval [1-2], i.e. such ratios are 1/1, 3/2, 5/4, 7/4, 9/8, 11/8, 13/8, 15/8, 17/16, 19/16, 21/16, ... where the numerators are A005408 (The odd numbers).
Let A_n be the upper triangular matrix in the group GL(n,2) that has zero entries below the diagonal and 1 elsewhere. For example for n=4 the matrix is / 1,1,1,1 / 0,1,1,1 / 0,0,1,1 / 0,0,0,1 /. The order of this matrix as an element of GL(n,2) is a(n-1). - Ahmed Fares (ahmedfares(AT)my-deja.com), Jul 14 2001
A006257(n)/a(n) = (0, 0.1, 0.01, 0.11, 0.001, ...) enumerates all binary fractions in the unit interval [0, 1). - Fredrik Johansson, Aug 14 2006
a(n) = maximum of row n+1 in A240769. - Reinhard Zumkeller, Apr 13 2014
This is the discriminator sequence for the odious numbers. - N. J. A. Sloane, May 10 2016
From Jianing Song, Jul 05 2025: (Start)
a(n) is the period of {binomial(N,n) mod 2: N in Z}. For the general result, see A349593.
Since the modulus (2) is a prime, the remainder of binomial(N,n) is given by Lucas's theorem. (End)

Crossrefs

Apart from the initial term, equals 2 * A053644. MASKTRANSi(A062383) seems to give a signed form of A038712. (See identities at A053644). floor_log_2 given in A054429.
Equals A003817(n)+1. Cf. A002884.
Bisection of A065285. Cf. A076877.
Equals for n>=1 the r(n) sequence of A160464. - Johannes W. Meijer, May 24 2009
Equals the r(n) sequence of A162440 for n>=1. - Johannes W. Meijer, Jul 06 2009
Discriminator of the odious numbers (A000069). - Jeffrey Shallit, May 08 2016
Column 2 of A349593. A064235 (if offset 0), A385552, A385553, and A385554 are respectively columns 3, 5, 6, and 10.

Programs

  • Haskell
    import Data.List (transpose)
    a062383 n = a062383_list !! n
    a062383_list = 1 : zs where
       zs = 2 : (map (* 2) $ concat $ transpose [zs, zs])
    -- Reinhard Zumkeller, Aug 27 2014, Mar 13 2014
    
  • Magma
    [2^Floor(Log(2,2*n+1)): n in [0..70]]; // Bruno Berselli, Mar 04 2016
    
  • Maple
    [seq(2^(floor_log_2(j)+1),j=0..127)]; or [seq(coerce1st_octave((2*j)+1),j=0..127)]; or [seq(a(j),j=0..127)];
    coerce1st_octave := proc(r) option remember; if(r < 1) then coerce1st_octave(2*r); else if(r >= 2) then coerce1st_octave(r/2); else (r); fi; fi; end;
    A062383 := proc(n)
        option remember;
        if n = 0 then
            1 ;
        else
            2*procname(floor(n/2));
        end if;
    end proc:
    A062383 := n -> 1 + Bits:-Iff(n, n):
    seq(A062383(n), n=0..69); # Peter Luschny, Sep 23 2019
  • Mathematica
    a[n_] := a[n] = 2 a[n/2 // Floor]; a[0] = 1; Table[a[n], {n, 0, 100}] (* Jean-François Alcover, Mar 04 2016 *)
    Table[2^Floor[Log2[n] + 1], {n, 0, 20}] (* Eric W. Weisstein, Nov 17 2017 *)
    2^Floor[Log2[Range[0, 20]] + 1] (* Eric W. Weisstein, Nov 17 2017 *)
    2^BitLength[Range[0, 100]] (* Paolo Xausa, Jan 29 2025 *)
  • PARI
    { a=1; for (n=0, 1000, write("b062383.txt", n, " ", a*=ceil((n + 1)/a)) ) } \\ Harry J. Smith, Aug 06 2009
    
  • PARI
    a(n)=1<<(log(2*n+1)\log(2)) \\ Charles R Greathouse IV, Dec 08 2011
    
  • Python
    def A062383(n): return 1 << n.bit_length() # Chai Wah Wu, Jun 30 2022

Formula

a(1) = 1 and a(n+1) = a(n)*ceiling(n/a(n)). - Benoit Cloitre, Aug 17 2002
G.f.: 1/(1-x) * (1 + Sum_{k>=0} 2^k*x^2^k). - Ralf Stephan, Apr 18 2003
a(n) = A142151(2*n)/2 + 1. - Reinhard Zumkeller, Jul 15 2008
log(a(n))/log(2) = A029837(n+1). - Johannes W. Meijer, Jul 06 2009
a(n+1) = a(n) + A099894(n). - Reinhard Zumkeller, Aug 06 2009
a(n) = A264619(n) - A264618(n). - Reinhard Zumkeller, Dec 01 2015
a(n) is the smallest power of 2 > n. - Chai Wah Wu, Nov 04 2016
a(n) = 2^ceiling(log_2(n+1)). - M. F. Hasler, Sep 20 2017

A064235 The smallest power of 3 that is greater than or equal to n.

Original entry on oeis.org

1, 3, 3, 9, 9, 9, 9, 9, 9, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81, 81
Offset: 1

Views

Author

Dan Fux (dan.fux(AT)OpenGaia.com or danfux(AT)OpenGaia.com), Sep 22 2001

Keywords

Comments

Let A_n be the upper triangular matrix in the group GL(n,3) of invertible n X n matrices over GF(3) that has zero entries below the diagonal and 1 elsewhere. For example for n=4 the matrix is / 1,1,1,1 / 0,1,1,1 / 0,0,1,1 / 0,0,0,1 /. a(n) is the order of this matrix as an element of GL(n,3).
For n>1 a(n) is the smallest integer such that gcd(a(n),2^a(n)+1) >= n. - Benoit Cloitre, Apr 21 2002
From Jianing Song, Jul 05 2025: (Start)
a(n+1) is the period of {binomial(N,n) mod 3: N in Z}. For the general result, see A349593.
Since the modulus (3) is a prime, the remainder of binomial(N,n) is given by Lucas's theorem. (End)

Crossrefs

Cf. A062383.
With offset 0, column 3 of A349593. A062383, A385552, A385553, and A385554 are respectively columns 2, 5, 6, and 10.

Programs

  • Haskell
    import Data.List (transpose)
    a064235 n = genericIndex a064235_list (n - 1)
    a064235_list = 1 : zs where
       zs = 3 : 3 : (map (* 3) $ concat $ transpose [zs, zs, zs])
    -- Reinhard Zumkeller, Sep 02 2015
    
  • Maple
    A064235 := proc(n)
            ceil(log(n)/log(3)) ;
            3^% ;
    end proc: # R. J. Mathar, Nov 06 2011
  • Mathematica
    nn=100;With[{p3=3^Range[0,Ceiling[Log[3,nn]]]},Flatten[Table[Select[ p3, #>=n&, 1],{n,nn}]]] (* Harvey P. Dale, Mar 14 2013 *)
  • Python
    from gmpy2 import digits
    def A064235(n): return 3**len(digits(n-1,3)) if n>1 else 1 # Chai Wah Wu, Oct 21 2024

Formula

a(n) = 3 ^ A080342(n). - Reinhard Zumkeller, Sep 02 2015
Sum_{n>=1} 1/a(n)^2 = 4/3. - Amiram Eldar, Aug 16 2022

Extensions

More terms from James Sellers, Sep 26 2001

A385555 Period of {binomial(N,3) mod n: N in Z}.

Original entry on oeis.org

1, 4, 9, 8, 5, 36, 7, 16, 27, 20, 11, 72, 13, 28, 45, 32, 17, 108, 19, 40, 63, 44, 23, 144, 25, 52, 81, 56, 29, 180, 31, 64, 99, 68, 35, 216, 37, 76, 117, 80, 41, 252, 43, 88, 135, 92, 47, 288, 49, 100, 153, 104, 53, 324, 55, 112, 171, 116, 59, 360
Offset: 1

Views

Author

Jianing Song, Jul 03 2025

Keywords

Examples

			For N == 0, 1, ..., 26 (mod 27), binomial(N,3) == {0, 0, 0, 1, 4, 1, 2, 8, 2, 3, 3, 3, 4, 7, 4, 5, 2, 5, 6, 6, 6, 7, 1, 7, 8, 5, 8} (mod 4).
		

Crossrefs

Row n = 3 of A349593. A022998, A385556, A385557, A385558, A385559, and A385560 are respectively rows n = 2, 4, 5-6, 7, 8, and 9-10.
Cf. A089128.

Programs

  • Mathematica
    A385555[n_] := If[n == 1, 1, n*Product[p^Floor[Log[p, 3]], {p, FactorInteger[n][[All, 1]]}]];
    Array[A385555, 100] (* Paolo Xausa, Jul 07 2025 *)
    a[n_] := n * GCD[n, 6]; Array[a, 100] (* Amiram Eldar, Jul 07 2025 *)
  • PARI
    a(n, {choices=3}) = my(r=1, f=factor(n)); for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]); r *= p^(logint(choices, p)+e)); return(r)

Formula

Multiplicative with a(2^e) = 2^(e+1), a(3^e) = 3^(e+1), and a(p^e) = p^e for primes p >= 5.
From Amiram Eldar, Jul 07 2025: (Start)
a(n) = n * gcd(6, n) = n * A089128(n).
Dirichlet g.f.: zeta(s-1) * (1 + 1/2*(s-1)) * (1 + 2/3*(s-1)).
Sum_{k=1..n} a(k) ~ (5/4) * n^2. (End)

A385556 Period of {binomial(N,4) mod n: N in Z}.

Original entry on oeis.org

1, 8, 9, 16, 5, 72, 7, 32, 27, 40, 11, 144, 13, 56, 45, 64, 17, 216, 19, 80, 63, 88, 23, 288, 25, 104, 81, 112, 29, 360, 31, 128, 99, 136, 35, 432, 37, 152, 117, 160, 41, 504, 43, 176, 135, 184, 47, 576, 49, 200, 153, 208, 53, 648, 55, 224, 171, 232, 59, 720
Offset: 1

Views

Author

Jianing Song, Jul 03 2025

Keywords

Examples

			For N == 0, 1, ..., 31 (mod 32), binomial(N,4) == {0, 0, 0, 0, 1, 5, 7, 3, 6, 6, 2, 2, 7, 3, 1, 5, 4, 4, 4, 4, 5, 1, 3, 7, 2, 2, 6, 6, 3, 7, 5, 1} (mod 8).
		

Crossrefs

Row n = 4 of A349593. A022998, A385555, A385557, A385558, A385559, and A385560 are respectively rows n = 2, 3, 5-6, 7, 8, and 9-10.

Programs

  • Mathematica
    A385556[n_] := If[n == 1, 1, n*Product[p^Floor[Log[p, 4]], {p, FactorInteger[n][[All, 1]]}]];
    Array[A385556, 100] (* Paolo Xausa, Jul 07 2025 *)
    a[n_] := n * GCD[n, 6] * (2 - Mod[n, 2]); Array[a, 100] (* Amiram Eldar, Jul 07 2025 *)
  • PARI
    a(n, {choices=4}) = my(r=1, f=factor(n)); for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]); r *= p^(logint(choices, p)+e)); return(r)

Formula

Multiplicative with a(2^e) = 2^(e+2), a(3^e) = 3^(e+1), and a(p^e) = p^e for primes p >= 5.
From Amiram Eldar, Jul 07 2025: (Start)
a(n) = n * gcd(6, n) * (2 - (n mod 2)) = n * A089128(n) * A000034(n-1).
Dirichlet g.f.: zeta(s-1) * (1 + 3/2*(s-1)) * (1 + 2/3*(s-1)).
Sum_{k=1..n} a(k) ~ (25/12) * n^2. (End)

A385557 Period of {binomial(N,5) mod n: N in Z}. Also, period of {binomial(N,6) mod n: N in Z}.

Original entry on oeis.org

1, 8, 9, 16, 25, 72, 7, 32, 27, 200, 11, 144, 13, 56, 225, 64, 17, 216, 19, 400, 63, 88, 23, 288, 125, 104, 81, 112, 29, 1800, 31, 128, 99, 136, 175, 432, 37, 152, 117, 800, 41, 504, 43, 176, 675, 184, 47, 576, 49, 1000, 153, 208, 53, 648, 275, 224, 171, 232, 59, 3600
Offset: 1

Views

Author

Jianing Song, Jul 03 2025

Keywords

Examples

			For N == 0, 1, ..., 71 (mod 72), binomial(N,5) == {0, 0, 0, 0, 0, 1, 0, 3, 2, 0, 0, 0, 0, 3, 4, 3, 0, 2, 0, 0, 0, 3, 0, 1, 0, 0, 2, 0, 0, 3, 0, 3, 4, 0, 0, 2, 0, 3, 0, 3, 0, 4, 0, 0, 2, 3, 0, 3, 0, 0, 4, 0, 0, 5, 0, 3, 0, 0, 0, 4, 0, 3, 2, 3, 0, 0, 0, 0, 4, 3, 0, 5} (mod 6), and binomial(N,6) == {0, 0, 0, 0, 0, 0, 1, 1, 4, 0, 0, 0, 0, 0, 3, 1, 4, 4, 0, 0, 0, 0, 3, 3, 4, 4, 4, 0, 0, 0, 3, 3, 0, 4, 4, 4, 0, 0, 3, 3, 0, 0, 4, 4, 4, 0, 3, 3, 0, 0, 0, 4, 4, 4, 3, 3, 0, 0, 0, 0, 4, 4, 1, 3, 0, 0, 0, 0, 0, 4, 1, 1} (mod 6).
		

Crossrefs

Rows n = 5 and 6 of A349593. A022998, A385555, A385556, A385558, A385559, and A385560 are respectively rows 2, 3, 4, 7, 8, and 9-10.

Programs

  • Mathematica
    A385557[n_] := If[n == 1, 1, n*Product[p^Floor[Log[p, 5]], {p, FactorInteger[n][[All, 1]]}]];
    Array[A385557, 100] (* Paolo Xausa, Jul 07 2025 *)
    a[n_] := n * GCD[n, 30] * (2 - Mod[n, 2]); Array[a, 100] (* Amiram Eldar, Jul 07 2025 *)
  • PARI
    a(n, {choices=5}) = my(r=1, f=factor(n)); for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]); r *= p^(logint(choices, p)+e)); return(r)

Formula

Multiplicative with a(2^e) = 2^(e+2), a(3^e) = 3^(e+1), a(5^e) = 5^(e+1), and a(p^e) = p^e for primes p >= 7.
From Amiram Eldar, Jul 07 2025: (Start)
a(n) = n * gcd(30, n) * (2 - (n mod 2)).
Dirichlet g.f.: zeta(s-1) * (1 + 3/2*(s-1)) * (1 + 2/3*(s-1)) * (1 + 4/5*(s-1)).
Sum_{k=1..n} a(k) ~ (15/4) * n^2. (End)

A385558 Period of {binomial(N,7) mod n: N in Z}.

Original entry on oeis.org

1, 8, 9, 16, 25, 72, 49, 32, 27, 200, 11, 144, 13, 392, 225, 64, 17, 216, 19, 400, 441, 88, 23, 288, 125, 104, 81, 784, 29, 1800, 31, 128, 99, 136, 1225, 432, 37, 152, 117, 800, 41, 3528, 43, 176, 675, 184, 47, 576, 343, 1000, 153, 208, 53, 648, 275, 1568, 171, 232, 59, 3600
Offset: 1

Views

Author

Jianing Song, Jul 03 2025

Keywords

Examples

			For N == 0, 1, ..., 48 (mod 49), binomial(N,7) == {0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6} (mod 7).
		

Crossrefs

Row n = 7 of A349593. A022998, A385555, A385556, A385557, A385559, and A385560 are respectively rows 2, 3, 4, 5-6, 8, and 9-10.

Programs

  • Mathematica
    A385558[n_] := If[n == 1, 1, n*Product[p^Floor[Log[p, 7]], {p, FactorInteger[n][[All, 1]]}]];
    Array[A385558, 100] (* Paolo Xausa, Jul 07 2025 *)
    a[n_] := n * GCD[n, 210] * (2 - Mod[n, 2]); Array[a, 100] (* Amiram Eldar, Jul 07 2025 *)
  • PARI
    a(n, {choices=7}) = my(r=1, f=factor(n)); for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]); r *= p^(logint(choices, p)+e)); return(r)

Formula

Multiplicative with a(2^e) = 2^(e+2), a(3^e) = 3^(e+1), a(5^e) = 5^(e+1), a(7^e) = 7^(e+1), and a(p^e) = p^e for primes p >= 11.
From Amiram Eldar, Jul 07 2025: (Start)
a(n) = n * gcd(210, n) * (2 - (n mod 2)).
Dirichlet g.f.: zeta(s-1) * (1 + 3/2*(s-1)) * (1 + 2/3*(s-1)) * (1 + 4/5*(s-1)) * (1 + 6/7*(s-1)).
Sum_{k=1..n} a(k) ~ (195/28) * n^2. (End)

A385559 Period of {binomial(N,8) mod n: N in Z}.

Original entry on oeis.org

1, 16, 9, 32, 25, 144, 49, 64, 27, 400, 11, 288, 13, 784, 225, 128, 17, 432, 19, 800, 441, 176, 23, 576, 125, 208, 81, 1568, 29, 3600, 31, 256, 99, 272, 1225, 864, 37, 304, 117, 1600, 41, 7056, 43, 352, 675, 368, 47, 1152, 343, 2000, 153, 416, 53, 1296, 275, 3136, 171, 464, 59, 7200
Offset: 1

Views

Author

Jianing Song, Jul 03 2025

Keywords

Examples

			For N == 0, 1, ..., 63 (mod 64), binomial(N,8) == {0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 5, 5, 7, 7, 3, 3, 6, 6, 6, 6, 2, 2, 2, 2, 7, 7, 3, 3, 1, 1, 5, 5, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 1, 1, 3, 3, 7, 7, 2, 2, 2, 2, 6, 6, 6, 6, 3, 3, 7, 7, 5, 5, 1, 1} (mod 8).
		

Crossrefs

Row n = 8 of A349593. A022998, A385555, A385556, A385557, A385558, and A385560 are respectively rows 2, 3, 4, 5-6, 7, and 9-10.

Programs

  • Mathematica
    A385559[n_] := If[n == 1, 1, n*Product[p^Floor[Log[p, 8]], {p, FactorInteger[n][[All, 1]]}]];
    Array[A385559, 100] (* Paolo Xausa, Jul 07 2025 *)
    a[n_] := n * GCD[n, 210] * (4 - 3 * Mod[n, 2]); Array[a, 100] (* Amiram Eldar, Jul 07 2025 *)
  • PARI
    a(n, {choices=8}) = my(r=1, f=factor(n)); for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]); r *= p^(logint(choices, p)+e)); return(r)

Formula

Multiplicative with a(2^e) = 2^(e+3), a(3^e) = 3^(e+1), a(5^e) = 5^(e+1), a(7^e) = 7^(e+1), and a(p^e) = p^e for primes p >= 11.
From Amiram Eldar, Jul 07 2025: (Start)
a(n) = n * gcd(210, n) * (4 - 3 * (n mod 2)).
Dirichlet g.f.: zeta(s-1) * (1 + 7/2*(s-1)) * (1 + 2/3*(s-1)) * (1 + 4/5*(s-1)) * (1 + 6/7*(s-1)).
Sum_{k=1..n} a(k) ~ (351/28) * n^2. (End)

A385560 Period of {binomial(N,9) mod n: N in Z}. Also, period of {binomial(N,10) mod n: N in Z}.

Original entry on oeis.org

1, 16, 27, 32, 25, 432, 49, 64, 81, 400, 11, 864, 13, 784, 675, 128, 17, 1296, 19, 800, 1323, 176, 23, 1728, 125, 208, 243, 1568, 29, 10800, 31, 256, 297, 272, 1225, 2592, 37, 304, 351, 1600, 41, 21168, 43, 352, 2025, 368, 47, 3456, 343, 2000, 459, 416, 53, 3888, 275, 3136, 513, 464, 59, 21600
Offset: 1

Views

Author

Jianing Song, Jul 03 2025

Keywords

Examples

			For N == 0, 1, ..., 80 (mod 81), binomial(N,9) == {0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 4, 4, 4, 1, 1, 1, 2, 2, 2, 8, 8, 8, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 7, 7, 7, 4, 4, 4, 5, 5, 5, 2, 2, 2, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 1, 1, 1, 7, 7, 7, 8, 8, 8, 5, 5, 5, 8, 8, 8} (mod 9), and binomial(N,10) == {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 7, 2, 6, 7, 8, 0, 2, 4, 6, 5, 4, 3, 5, 7, 0, 3, 6, 0, 3, 6, 0, 3, 6, 0, 4, 8, 3, 1, 8, 6, 1, 5, 0, 5, 1, 6, 8, 1, 3, 8, 4, 0, 6, 3, 0, 6, 3, 0, 6, 3, 0, 7, 5, 3, 4, 5, 6, 4, 2, 0, 8, 7, 6, 2, 7, 3, 2, 1} (mod 9).
		

Crossrefs

Rows n = 9 and 10 of A349593. A022998, A385555, A385556, A385557, A385558, and A385559 are respectively rows 2, 3, 4, 5-6, 7, and 8.

Programs

  • Mathematica
    A385560[n_] := If[n == 1, 1, n*Product[p^Floor[Log[p, 9]], {p, FactorInteger[n][[All, 1]]}]];
    Array[A385560, 100] (* Paolo Xausa, Jul 07 2025 *)
    a[n_] := n * GCD[n, 6] * GCD[n, 210] * (2 - Mod[n, 2]); Array[a, 100] (* Amiram Eldar, Jul 07 2025 *)
  • PARI
    a(n, {choices=10}) = my(r=1, f=factor(n)); for(j=1, #f[, 1], my(p=f[j, 1], e=f[j, 2]); r *= p^(logint(choices, p)+e)); return(r)

Formula

Multiplicative with a(2^e) = 2^(e+3), a(3^e) = 3^(e+2), a(5^e) = 5^(e+1), a(7^e) = 7^(e+1), and a(p^e) = p^e for primes p >= 11.
From Amiram Eldar, Jul 07 2025: (Start)
a(n) = n * gcd(6, n) * gcd(210, n) * (2 - (n mod 2)).
Dirichlet g.f.: zeta(s-1) * (1 + 7/2*(s-1)) * (1 + 8/3*(s-1)) * (1 + 4/5*(s-1)) * (1 + 6/7*(s-1)).
Sum_{k=1..n} a(k) ~ (3861/140) * n^2. (End)

A385552 Period of {binomial(N,n) mod 5: N in Z}.

Original entry on oeis.org

1, 5, 5, 5, 5, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125, 125
Offset: 0

Views

Author

Jianing Song, Jul 03 2025

Keywords

Comments

a(n) is the smallest power of 5 > n. For the general result, see A349593.
Since the modulus (5) is a prime, the remainder of binomial(N,n) is given by Lucas's theorem.

Examples

			For N == 0, 1, ..., 24 (mod 5), binomial(N,5) == {0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4} (mod 5).
		

Crossrefs

Column 5 of A349593. A062383, A064235 (if offset 0), A385553, and A385554 are respectively columns 2, 3, 6, and 10.

Programs

  • PARI
    a(n) = if(n, 5^(logint(n,5)+1), 1)
    
  • Python
    from sympy import integer_log
    def A385552(n): return 5*5**(integer_log(n,5)[0]) if n else 1 # Chai Wah Wu, Jul 06 2025
Showing 1-10 of 13 results. Next