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

A008611 a(n) = a(n-3) + 1, with a(0)=a(2)=1, a(1)=0.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Mar 15 1996

Keywords

Comments

Molien series of 2-dimensional representation of cyclic group of order 3 over GF(2).
One step back, two steps forward.
The crossing number of the graph C(n, {1,3}), n >= 8, is [n/3] + n mod 3, which gives this sequence starting at the first 4. [Yang Yuansheng et al.]
A Chebyshev transform of A078008. The g.f. is the image of (1-x)/(1-x-2*x^2) (g.f. of A078008) under the Chebyshev transform A(x)-> (1/(1+x^2))*A(x/(1+x^2)). - Paul Barry, Oct 15 2004
A047878 is an essentially identical sequence. - Anton Chupin, Oct 24 2009
Rhyme scheme of Dante Alighieri's "Divine Comedy." - David Gaita, Feb 11 2011
A194960 results from deleting the first four terms of A008611. Note that deleting the first term or first four terms of A008611 leaves a concatenation of segments (n, n+1, n+2); for related concatenations, see
A008619, (n,n+1) after deletion of first term;
A053737, (n,n+1,n+2,n+3) beginning with n=0;
A053824, (n to n+4) beginning with n=0. - Clark Kimberling, Sep 07 2011
It appears that a(n) is the number of roots of x^(n+1) + x + 1 inside the unit circle. - Michel Lagneau, Nov 02 2012
Also apparently for n >= 2: a(n) is the largest remainder r that results from dividing n+2 by 1..n+2 more than once, i.e., a(n) = max(i, A072528(n+2,i)>1). - Ralf Stephan, Oct 21 2013
Number of n-element subsets of [n+1] whose sum is a multiple of 3. a(4) = 1: {1,2,4,5}. - Alois P. Heinz, Feb 06 2017
It appears that a(n) is the number of roots of the Fibonacci polynomial F(n+2,x) strictly inside the unit circle of the complex plane. - Michel Lagneau, Apr 07 2017
For the proof of the preceding conjecture see my comments under A008615 and A049310. Chebyshev S(n,x) = i^n*F(n+1,-i*x), with i = sqrt(-1). - Wolfdieter Lang, May 06 2017
The sequence is the interleaving of three sequences: the positive integers (A000027), the nonnegative integers (A001477), and the positive integers, in that order. - Guenther Schrack, Nov 07 2020
a(n) is the number of multiples of 3 between n and 2n. - Christian Barrientos, Dec 20 2021
a(n) is the least number of football games a team has to play to be able to get n-1 points, where a win is 3 points, a draw is 1 point, and a loss is 0 points. - Sigurd Kittilsen, Dec 01 2022

Examples

			G.f. = 1 + x^2 + 2*x^3 + x^4 + 2*x^5 + 3*x^6 + 2*x^7 + 3*x^8 + 4*x^9 + ...
		

References

  • D. J. Benson, Polynomial Invariants of Finite Groups, Cambridge, 1993, p. 103.

Crossrefs

Programs

  • Haskell
    a008611 n = n' + mod r 2 where (n', r) = divMod (n + 1) 3
    a008611_list = f [1,0,1] where f xs = xs ++ f (map (+ 1) xs)
    -- Reinhard Zumkeller, Nov 25 2013
    
  • Magma
    [(n-1)-2*Floor((n-1)/3): n in [0..90]]; // Vincenzo Librandi, Aug 21 2011
    
  • Maple
    with(numtheory): for n from 1 to 70 do:it:=0:
    y:=[fsolve(x^n+x+1, x, complex)] : for m from 1 to nops(y) do : if abs(y[m])< 1 then it:=it+1:else fi:od: printf(`%d, `,it):od:
    A008611:=n->(n-1)-2*floor((n-1)/3); seq(A008611(n), n=0..50); # Wesley Ivan Hurt, May 18 2014
  • Mathematica
    With[{nn=30},Riffle[Riffle[Range[nn],Range[0,nn-1]],Range[nn],3]] (* or *) RecurrenceTable[{a[0]==a[2]==1,a[1]==0,a[n]==a[n-3]+1},a,{n,90}] (* Harvey P. Dale, Nov 06 2011 *)
    LinearRecurrence[{1, 0, 1, -1}, {1, 0, 1, 2}, 100] (* Vladimir Joseph Stephan Orlovsky, Feb 23 2012 *)
    a[ n_] := Quotient[n - 1, 3] + Mod[n + 2, 3]; (* Michael Somos, Jan 23 2014 *)
  • PARI
    {a(n) = (n-1) \ 3 + (n+2) % 3}; /* Michael Somos, Jan 23 2014 */

Formula

a(n) = a(n-3) + 1.
a(n) = (n-1) - 2*floor((n-1)/3).
G.f.: (1 + x^2 + x^4)/(1 - x^3)^2.
After the initial term, has form {n, n+1, n+2} for n=0, 1, 2, ...
From Paul Barry, Mar 18 2004: (Start)
a(n) = Sum_{k=0..n} (-1)^floor(2*(k-2)/3);
a(n) = 4*sqrt(3)*cos(2*Pi*n/3 + Pi/6)/9 + (n+1)/3. (End)
From Paul Barry, Oct 15 2004: (Start)
G.f.: (1 - x + x^2)/((1 + x + x^2)*(x-1)^2);
a(n) = Sum_{k=0..floor(n/2)} binomial(n-k, k)*A078008(n-2k)*(-1)^k. (End)
a(n) = -a(-2-n) for all n in Z.
Euler transform of length 6 sequence [0, 1, 2, 0, 0, -1]. - Michael Somos, Jan 23 2014
a(n) = ((n-1) mod 3) + floor((n-1)/3). - Wesley Ivan Hurt, May 18 2014
PSUM transform of A257075. - Michael Somos, Apr 15 2015
a(n) = A194960(n-3), n >= 0, with extended A194960. See the a(n) formula two lines above. - Wolfdieter Lang, May 06 2017
From Guenther Schrack, Nov 07 2020: (Start)
a(n) = (3*n + 3 + 2*(w^(2*n)*(1 - w) + w^n*(2 + w)))/9, where w = (-1 + sqrt(-3))/2, a primitive third root of unity;
a(n) = (n + 1 + 2*A049347(n))/3;
a(n) = (2*n - A330396(n-1))/3. (End)
E.g.f.: (3*exp(x)*(1 + x) + exp(-x/2)*(6*cos(sqrt(3)*x/2) - 2*sqrt(3)*sin(sqrt(3)*x/2)))/9. - Stefano Spezia, May 06 2022
Sum_{n>=2} (-1)^n/a(n) = 3*log(2) - 1. - Amiram Eldar, Sep 10 2023

A023645 a(n) = tau(n)-1 if n is odd or tau(n)-2 if n is even.

Original entry on oeis.org

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

Views

Author

Keywords

Comments

Vertex-transitive graphs of valency 2 with n nodes.
Number of values of k such that n+2 divided by k leaves a remainder 2. - Amarnath Murthy, Aug 01 2002
Number of divisors of n that are less than n/2. - Peter Munn, Mar 31 2017, or equivalently, number of divisors of n that are greater than 2. - Antti Karttunen, Feb 20 2023
For n > 2, a(n) is the number of planar arrangements of equal-sized regular n-gons such that their centers lie on a circle and neighboring n-gons have an edge in common. - Peter Munn, Apr 23 2017
Number of partitions of n into two distinct parts such that the smaller divides the larger. - Wesley Ivan Hurt, Dec 21 2017

Examples

			x^3 + x^4 + x^5 + 2*x^6 + x^7 + 2*x^8 + 2*x^9 + 2*x^10 + x^11 + 4*x^12 + ...
		

References

  • CRC Handbook of Combinatorial Designs, 1996, p. 649.

Crossrefs

Programs

  • Maple
    with(numtheory); f := n->if n mod 2 = 1 then tau(n)-1 else tau(n)-2; fi;
  • Mathematica
    Table[s = DivisorSigma[0, n]; If[OddQ[n], s - 1, s - 2], {n, 100}] (* T. D. Noe, Nov 18 2013 *)
    Array[DivisorSigma[0, #] - 1 - Boole@ EvenQ@ # &, 104] (* Michael De Vlieger, Apr 25 2017 *)
  • PARI
    {a(n) = if( n<1, 0, numdiv(n) - 2 + n%2)} /* Michael Somos, Apr 29 2003 */
    
  • PARI
    a(n) = sumdiv(n, d, d < n/2); \\ Michel Marcus, Apr 01 2017

Formula

G.f.: Sum_{k>0} x^(3*k) / (1 - x^k). - Michael Somos, Apr 29 2003.
a(2*n) = A069930(n). a(2*n + 1) = A095374(n). - Michael Somos, Aug 30 2012
a(n) = A072528(n+2,2) for n > 2. - Peter Munn, May 14 2017
From Peter Bala, Jan 13 2021: (Start)
a(n) = Sum_{ d|n, d < n/2 } 1. Cf. A296955.
G.f.: Sum_{k >= 3} x^k/(1 - x^k). (End)
a(n) = A049992(n) - A014405(n). - Antti Karttunen, Feb 20 2023
Sum_{k=1..n} a(k) ~ n * (log(n) + 2*gamma - 5/2), where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 08 2024

Extensions

More terms from Vladeta Jovovic, Dec 03 2001

A230399 Smallest k such that when k is divided by all numbers <= k the remainder n occurs most often.

Original entry on oeis.org

1, 7, 26, 23, 34, 53, 118, 167, 188, 69, 178, 179, 372, 349, 374, 375, 376, 377, 498, 499, 356, 501, 502, 503, 1284, 1285, 746, 747, 748, 749, 1038, 1039, 1112, 753, 754, 755, 2136, 2137, 2138, 2139, 2140, 2141, 2562, 2443, 1484, 2445, 1486, 1487, 2568, 2569, 2570, 2571, 2572, 2573, 2934, 2575
Offset: 0

Views

Author

Vladimir Letsko, Oct 18 2013

Keywords

Comments

Number of row in A072528 where it happens first that the n-th column contains the maximum value in the row. - Ralf Stephan, Oct 21 2013
Any nonnegative integer n is the most common remainder during dividing m by all numbers not exceeding m for infinitely many different positive integers m.
Ties for most common are not allowed. Thus a(1) is not 5, although 0 and 1 both occur twice among 5 mod 1 to 5 mod 5. - Robert Israel, May 10 2020
Vladimir Letsko (see Letsko Link) asks if a(2013) exists (paraphrasing his question) without asking its value. Indeed, for m = 526173 we have T(m, 2013) = 68 where 68 is the largest value of T(526173, k) for k >= 0 and T as defined in A072528. - David A. Corneth, May 12 2020

Examples

			a(1) = 7 because
(1) 7 mod 2 = 7 mod 3 = 7 mod 6 = 1 and the other remainders occur fewer times;
(2) 7 is the least number k for which r = k mod b yields the remainder r=1 for more bases b < k than any other remainder.
		

Crossrefs

Programs

  • Maple
    maxrem:=proc(n) local r,n1,i,mx,M,R;n1:=`if`(n mod 2 = 0, n/2-1,(n-1)/2);
    R:=Array(0..n1,fill=1):
    if n mod 2 = 0 then R[0]:=2 fi:
    for i to n1 do r:=n mod i: R[r]:=R[r]+1 od:
    mx:=R[0]:M:={0}:
    for i to n1 do
    if R[i]> mx then mx:=R[i]:M:={i} elif mx=R[i] then M:=M union {i} fi od:
    M; end;
    Rs:={0}:S:=[[0,1]]:for n to 6000 do r:=maxrem(n):if nops(r)=1 then r:=op(r):
    if not member(r,Rs) then Rs:=Rs union {r}:S:=[op(S),[r,n]] fi fi od:
    S:=sort(S);
    T:=[]:for i to nops(S) do if S[i,1]=i-1 then T:=[op(T),S[i,2]] else break fi od:T;
  • Mathematica
    a[n_] := Module[{k, rems}, For[k = 1, True, k++, rems = SortBy[Tally[Mod[k, Range[k]]], Last]; If[rems[[-1, 1]] == n && rems[[-1, 2]] != rems[[-2, 2]], Print[n, " ", k]; Return[k]]]];
    a[0] = 1;
    a /@ Range[0, 100] (* Jean-François Alcover, Jun 18 2020 *)
  • PARI
    record(n)=v=vector(n+1); for(d=1,n, t=(n%d)+1; v[t]=v[t]+1); m=0; p=0; for(i=1,n,if(v[i]>m, m=v[i]; p=i));p
    for(n=1,100, for(j=1,10^6, if(record(j)==n, print1(j,", "); break))) \\ Ralf Stephan, Oct 21 2013

A072527 Number of values of k such that n divided by k leaves a remainder 3.

Original entry on oeis.org

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

Views

Author

Amarnath Murthy, Aug 01 2002

Keywords

Comments

For n > 3, the number of divisors of (n - 3) that are greater than 3; equivalently, those that are less than (n - 3)/3. - Peter Munn, May 18 2017

Examples

			a(15) = 3 as 15 divided by exactly three numbers 4, 6 and 12 leaves a remainder 3.
		

Crossrefs

Programs

  • Mathematica
    A072527[n_] := If[n>6, DivisorSum[n-3, 1&, #>3&], 0];
    Array[A072527, 150] (* Paolo Xausa, Jan 18 2024 *)
  • PARI
    a(n) = sum(k=1, n-1, (n % k) == 3); \\ Michel Marcus, May 25 2017
    
  • PARI
    a(n)=if(n>6, numdiv(n-3) - if(n%6==3, 3, if(n%6==2 || n%6==4, 1, 2)), 0) \\ Charles R Greathouse IV, May 27 2017

Formula

a(n) = tau(n-3)-1 if n is congruent to {2, 4} mod 6, tau(n-3)-2 if n is congruent to {0, 1, 5} mod 6, tau(n-3)-3 if n is congruent to 3 mod 6; n<>3. - Vladeta Jovovic, Aug 06 2002
G.f.: Sum_{k>0} x^(4*k+3)/(1-x^k). - Vladeta Jovovic, Dec 15 2002
Sum_{k=1..n} a(k) ~ n * (log(n) + 2*gamma - 17/6), where gamma is Euler's constant (A001620). - Amiram Eldar, Jan 18 2024

Extensions

More terms from Matthew Conroy, Sep 09 2002
Incorrect comment deleted by Peter Munn, May 25 2017

A227911 Number of remainders occurring only once when dividing n by 1,2,...n.

Original entry on oeis.org

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

Views

Author

Ralf Stephan, Oct 13 2013

Keywords

Comments

Number of 1's in row n of A072528.

Examples

			9 divided by 1,2...9 gives the remainders 0,1,0,1,4,3,2,1,0 of which 2,3,4 occur only once, so a(9)=3.
		

Programs

Showing 1-5 of 5 results.