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

A085787 Generalized heptagonal numbers: m*(5*m - 3)/2, m = 0, +-1, +-2 +-3, ...

Original entry on oeis.org

0, 1, 4, 7, 13, 18, 27, 34, 46, 55, 70, 81, 99, 112, 133, 148, 172, 189, 216, 235, 265, 286, 319, 342, 378, 403, 442, 469, 511, 540, 585, 616, 664, 697, 748, 783, 837, 874, 931, 970, 1030, 1071, 1134, 1177, 1243, 1288, 1357, 1404, 1476, 1525, 1600, 1651, 1729
Offset: 0

Views

Author

Jon Perry, Jul 23 2003

Keywords

Comments

Zero together with the partial sums of A080512. - Omar E. Pol, Sep 10 2011
Second heptagonal numbers (A147875) and positive terms of A000566 interleaved. - Omar E. Pol, Aug 04 2012
These numbers appear in a theta function identity. See the Hardy-Wright reference, Theorem 355 on p. 284. See the g.f. of A113429. - Wolfdieter Lang, Oct 28 2016
Characteristic function is A133100. - Michael Somos, Jan 30 2017
40*a(n) + 9 is a square. - Bruno Berselli, Apr 18 2018
Numbers k such that the concatenation k225 is a square. - Bruno Berselli, Nov 07 2018
The sequence terms occur as exponents in the expansion of Sum_{n >= 0} q^(n*(n+1)) * Product_{k >= n+1} 1 - q^k = 1 - q - q^4 + q^7 + q^13 - q^18 - q^27 + + - - ... (see Hardy and Wright, Theorem 363, p. 290). - Peter Bala, Dec 15 2024

Examples

			From the first formula: a(5) = A000217(5) + A000217(2) = 15 + 3 = 18.
		

References

  • G. H. Hardy and E. M. Wright, An Introduction to the Theory of Numbers, Fifth ed., Clarendon Press, Oxford, 2003, p. 284.

Crossrefs

Column 3 of A195152.
Sequences of generalized k-gonal numbers: A001318 (k=5), A000217 (k=6), this sequence (k=7), A001082 (k=8), A118277 (k=9), A074377 (k=10), A195160 (k=11), A195162 (k=12), A195313 (k=13), A195818 (k=14), A277082 (k=15), A274978 (k=16), A303305 (k=17), A274979 (k=18), A303813 (k=19), A218864 (k=20), A303298 (k=21), A303299 (k=22), A303303 (k=23), A303814 (k=24), A303304 (k=25), A316724 (k=26), A316725 (k=27), A303812 (k=28), A303815 (k=29), A316729 (k=30).

Programs

  • Haskell
    a085787 n = a085787_list !! n
    a085787_list = scanl (+) 0 a080512_list
    -- Reinhard Zumkeller, Apr 06 2015
  • Magma
    [5*n*(n+1)/8-1/16+(-1)^n*(2*n+1)/16: n in [0..60]]; // Vincenzo Librandi, Sep 11 2011
    
  • Mathematica
    Select[Table[(n*(n+1)/2-1)/5,{n,500}],IntegerQ] (* Vladimir Joseph Stephan Orlovsky, Feb 06 2012 *)
  • PARI
    t(n)=n*(n+1)/2
    for(i=0,40,print1(t(i)+t(floor(i/2)), ", "))
    
  • PARI
    {a(n) = (5*(-n\2)^2 - (-n\2)*3*(-1)^n) / 2}; /* Michael Somos, Oct 17 2006 */
    

Formula

a(n) = A000217(n) + A000217(floor(n/2)).
a(2*n-1) = A000566(n).
a(2*n) = A147875(n). - Bruno Berselli, Apr 18 2018
G.f.: x * (1 + 3*x + x^2) / ((1 - x) * (1 - x^2)^2). a(n) = a(-1-n) for all n in Z. - Michael Somos, Oct 17 2006
a(n) = 5*n*(n + 1)/8 - 1/16 + (-1)^n*(2*n + 1)/16. - R. J. Mathar, Jun 29 2009
a(n) = (A000217(n) + A001082(n))/2 = (A001318(n) + A118277(n))/2. - Omar E. Pol, Jan 11 2013
a(n) = A002378(n) - A001318(n). - Omar E. Pol, Oct 23 2013
Sum_{n>=1} 1/a(n) = 10/9 + (2*sqrt(1 - 2/sqrt(5))*Pi)/3. - Vaclav Kotesovec, Oct 05 2016
E.g.f.: (x*(9 + 5*x)*exp(x) - (1 - 2*x)*sinh(x))/8. - Franck Maminirina Ramaharo, Nov 07 2018
Sum_{n>=1} (-1)^(n+1)/a(n) = 5*log(5)/3 - 10/9 - 2*sqrt(5)*log(phi)/3, where phi is the golden ratio (A001622). - Amiram Eldar, Feb 28 2022

Extensions

New name from T. D. Noe, Apr 21 2006
Formula in sequence name added by Omar E. Pol, May 28 2012

A195161 Multiples of 8 and odd numbers interleaved.

Original entry on oeis.org

0, 1, 8, 3, 16, 5, 24, 7, 32, 9, 40, 11, 48, 13, 56, 15, 64, 17, 72, 19, 80, 21, 88, 23, 96, 25, 104, 27, 112, 29, 120, 31, 128, 33, 136, 35, 144, 37, 152, 39, 160, 41, 168, 43, 176, 45, 184, 47, 192, 49, 200, 51, 208, 53, 216, 55, 224, 57, 232, 59
Offset: 0

Views

Author

Omar E. Pol, Sep 10 2011

Keywords

Comments

A008590 and A005408 interleaved. This is 8*n if n is even, n if n is odd, if n>=0.
Partial sums give the generalized 12-gonal (or dodecagonal) numbers A195162.
The moment generating function of p(x, m=2, n=1, mu=2) = 4*x*E(x, 2, 1), see A163931 and A274181, is given by M(a) = (- 4*log(1-a) - 4 * polylog(2, a))/a^2. The series expansion of M(a) leads to the sequence given above. - Johannes W. Meijer, Jul 03 2016
a(n) is also the length of the n-th line segment of the rectangular spiral whose vertices are the generalized 12-gonal numbers. - Omar E. Pol, Jul 27 2018

Crossrefs

Column 8 of A195151.
Sequences whose partial sums give the generalized n-gonal numbers, if n>=5: A026741, A001477, zero together with A080512, A022998, A195140, zero together with A165998, A195159, this sequence, A195312.
Cf. A144433.

Programs

  • Magma
    &cat[[8*n, 2*n+1]: n in [0..30]]; // Vincenzo Librandi, Sep 27 2011
    
  • Maple
    a := proc(n): (6*(-1)^n+10)*n/4 end: seq(a(n), n=0..59); # Johannes W. Meijer, Jul 03 2016
  • Mathematica
    With[{nn=30},Riffle[8*Range[0,nn],2*Range[0,nn]+1]] (* or *) LinearRecurrence[{0,2,0,-1},{0,1,8,3},60] (* Harvey P. Dale, Nov 24 2013 *)
  • PARI
    concat(0, Vec(x*(1+8*x+x^2)/((1-x)^2*(1+x)^2) + O(x^99))) \\ Altug Alkan, Jul 04 2016

Formula

a(2n) = 8n, a(2n+1) = 2n+1. [corrected by Omar E. Pol, Jul 26 2018]
a(n) = (6*(-1)^n+10)*n/4. - Vincenzo Librandi, Sep 27 2011
a(n) = 2*a(n-2)-a(n-4). G.f.: x*(1+8*x+x^2)/((1-x)^2*(1+x)^2). - Colin Barker, Aug 11 2012
From Ilya Gutkovskiy, Jul 03 2016: (Start)
a(m*2^k) = m*2^(k+2), k>0.
E.g.f.: x*(4*sinh(x) + cosh(x)).
Dirichlet g.f.: 2^(-s)*(2^s + 6)*zeta(s-1). (End)
Multiplicative with a(2^e) = 4*2^e, a(p^e) = p^e for odd prime p. - Andrew Howroyd, Jul 23 2018
a(n) = A144433(n-1) for n > 1. - Georg Fischer, Oct 14 2018

A064455 a(2n) = 3n, a(2n-1) = n.

Original entry on oeis.org

1, 3, 2, 6, 3, 9, 4, 12, 5, 15, 6, 18, 7, 21, 8, 24, 9, 27, 10, 30, 11, 33, 12, 36, 13, 39, 14, 42, 15, 45, 16, 48, 17, 51, 18, 54, 19, 57, 20, 60, 21, 63, 22, 66, 23, 69, 24, 72, 25, 75, 26, 78, 27, 81, 28, 84, 29, 87, 30, 90, 31, 93, 32, 96, 33, 99, 34, 102, 35, 105, 36, 108
Offset: 1

Views

Author

N. J. A. Sloane, Oct 02 2001

Keywords

Comments

Also number of 1's in n-th row of triangle in A071030. - Hans Havermann, May 26 2002
Number of ON cells at generation n of 1-D CA defined by Rule 54. - N. J. A. Sloane, Aug 09 2014
a(n)*A098557(n) equals the second right hand column of A167556. - Johannes W. Meijer, Nov 12 2009
Given a(1) = 1, for all n > 1, a(n) is the least positive integer not equal to a(n-1) such that the arithmetic mean of the first n terms is an integer. The sequence of arithmetic means of the first 1, 2, 3, ..., terms is 1, 2, 2, 3, 3, 4, 4, ... (A004526 disregarding its first three terms). - Rick L. Shepherd, Aug 20 2013

Examples

			a(13) = a(2*7 - 1) = 7, a(14) = a(2*7) = 21.
a(8) = 8-9+10-11+12-13+14-15+16 = 12. - _Bruno Berselli_, Jun 05 2013
		

Crossrefs

Interleaving of A000027 and A008585 (without first term).

Programs

  • ARIBAS
    maxarg := 75; for n := 1 to maxarg do if n mod 2 = 1 then write((n+1) div 2, " ") else write((n div 2)*3," "); end; end;
    
  • GAP
    a:=[];;  for n in [1..75] do if n mod 2 = 0 then Add(a,3*n/2); else Add(a,(n+1)/2); fi; od; a; # Muniru A Asiru, Oct 28 2018
    
  • Haskell
    import Data.List (transpose)
    a064455 n = n + if m == 0 then n' else - n'  where (n',m) = divMod n 2
    a064455_list = concat $ transpose [[1 ..], [3, 6 ..]]
    -- Reinhard Zumkeller, Oct 12 2013
    
  • Magma
    [(1/2)*n*(-1)^n+n+(1/4)*(1-(-1)^n): n in [1..80]]; // Vincenzo Librandi, Aug 10 2014
    
  • Maple
    A064455 := proc(n)
        if type(n,'even') then
            3*n/2 ;
        else
            (n+1)/2 ;
        end if;
    end proc: # R. J. Mathar, Aug 03 2015
  • Mathematica
    Table[ If[ EvenQ[n], 3n/2, (n + 1)/2], {n, 1, 70} ]
  • PARI
    a(n) = { if (n%2, (n + 1)/2, 3*n/2) } \\ Harry J. Smith, Sep 14 2009
    
  • PARI
    a(n)=if(n<3,2*n-1,((n-1)*(n-2))%(2*n-1)) \\ Jim Singh, Oct 14 2018
    
  • Python
    def A064455(n): return (3*n - (2*n-1)*(n%2))//2
    print([A064455(n) for n in range(1,81)]) # G. C. Greubel, Jan 30 2025

Formula

a(n) = (1/2)*n*(-1)^n + n + (1/4)*(1 - (-1)^n). - Stephen Crowley, Aug 10 2009
G.f.: x*(1+3*x) / ( (1-x)^2*(1+x)^2 ). - R. J. Mathar, Mar 30 2011
From Jaroslav Krizek, Mar 22 2011: (Start)
a(n) = n - A123684(n-1) for odd n.
a(n) = n + a(n-1) for even n.
a(n) = A123684(n) + A137501(n).
Abs( a(n) - A123684(n) ) = A052928(n). (End)
a(n) = Sum_{i=n..2*n} i*(-1)^i. - Bruno Berselli, Jun 05 2013
a(n) = n + floor(n/2)*(-1)^(n mod 2). - Bruno Berselli, Dec 14 2015
a(n) = (n^2-3*n+2) mod (2*n-1) for n>2. - Jim Singh, Oct 31 2018
E.g.f.: (1/2)*(x*cosh(x) + (1+3*x)*sinh(x)). - G. C. Greubel, Jan 30 2025

A195140 Multiples of 5 and odd numbers interleaved.

Original entry on oeis.org

0, 1, 5, 3, 10, 5, 15, 7, 20, 9, 25, 11, 30, 13, 35, 15, 40, 17, 45, 19, 50, 21, 55, 23, 60, 25, 65, 27, 70, 29, 75, 31, 80, 33, 85, 35, 90, 37, 95, 39, 100, 41, 105, 43, 110, 45, 115, 47, 120, 49, 125, 51, 130, 53, 135, 55, 140, 57, 145, 59, 150, 61, 155, 63
Offset: 0

Views

Author

Omar E. Pol, Sep 10 2011

Keywords

Comments

This is 5*n/2 if n is even, n if n is odd.
Partial sums give the generalized enneagonal numbers A118277.
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 enneagonal numbers. - Omar E. Pol, Jul 27 2018

Crossrefs

A008587 and A005408 interleaved.
Column 5 of A195151.
Cf. Sequences whose partial sums give the generalized n-gonal numbers, if n>=5: A026741, A001477, zero together with A080512, A022998, this sequence, zero together with A165998, A195159, A195161, A195312.

Programs

  • Magma
    &cat[[5*n,2*n+1]: n in [0..31]]; // Bruno Berselli, Sep 27 2011
    
  • Mathematica
    With[{nn=40},Riffle[5*Range[0,nn],Range[1,2nn+1,2]]] (* or *) LinearRecurrence[ {0,2,0,-1},{0,1,5,3},80] (* Harvey P. Dale, Dec 15 2014 *)
  • PARI
    a(n)=(7+3*(-1)^n)*n/4 \\ Charles R Greathouse IV, Oct 07 2015

Formula

a(2n) = 5n, a(2n+1) = 2n+1.
G.f.: x*(1+5*x+x^2) / ((x-1)^2*(x+1)^2). - Alois P. Heinz, Sep 26 2011
From Bruno Berselli, Sep 27 2011: (Start)
a(n) = (7+3*(-1)^n)*n/4.
a(n) = -a(-n) = a(n-2)*n/(n-2) = 2*a(n-2)-a(n-4).
a(n) + a(n-1) = A047336(n). (End)
Multiplicative with a(2^e) = 5*2^(e-1), a(p^e) = p^e for odd prime p. - Andrew Howroyd, Jul 23 2018
Dirichlet g.f.: zeta(s-1) * (1 + 3/2^s). - Amiram Eldar, Oct 25 2023

Extensions

Corrected and edited by Alois P. Heinz, Sep 25 2011

A195151 Square array read by antidiagonals upwards: T(n,k) = n*((k-2)*(-1)^n+k+2)/4, n >= 0, k >= 0.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Sep 14 2011

Keywords

Comments

Also square array T(n,k) read by antidiagonals in which column k lists the multiples of k and the odd numbers interleaved, n>=0, k>=0. Also square array T(n,k) read by antidiagonals in which if n is even then row n lists the multiples of (n/2), otherwise if n is odd then row n lists a constant sequence: the all n's sequence. Partial sums of the numbers of column k give the column k of A195152. Note that if k >= 1 then partial sums of the numbers of the column k give the generalized m-gonal numbers, where m = k + 4.
All columns are multiplicative. - Andrew Howroyd, Jul 23 2018

Examples

			Array begins:
.  0,   0,   0,   0,   0,   0,   0,   0,   0,   0,...
.  1,   1,   1,   1,   1,   1,   1,   1,   1,   1,...
.  0,   1,   2,   3,   4,   5,   6,   7,   8,   9,...
.  3,   3,   3,   3,   3,   3,   3,   3,   3,   3,...
.  0,   2,   4,   6,   8,  10,  12,  14,  16,  18,...
.  5,   5,   5,   5,   5,   5,   5,   5,   5,   5,...
.  0,   3,   6,   9,  12,  15,  18,  21,  24,  27,...
.  7,   7,   7,   7,   7,   7,   7,   7,   7,   7,...
.  0,   4,   8,  12,  16,  20,  24,  28,  32,  36,...
.  9,   9,   9,   9,   9,   9,   9,   9,   9,   9,...
.  0,   5,  10,  15,  20,  25,  30,  35,  40,  45,...
...
		

Crossrefs

Columns k: A026741 (k=1), A001477 (k=2), zero together with A080512 (k=3), A022998 (k=4), A195140 (k=5), zero together with A165998 (k=6), A195159 (k=7), A195161 (k=8), A195312 k=(9), A195817 (k=10), A317311 (k=11), A317312 (k=12), A317313 (k=13), A317314 k=(14), A317315 (k=15), A317316 (k=16), A317317 (k=17), A317318 (k=18), A317319 k=(19), A317320 (k=20), A317321 (k=21), A317322 (k=22), A317323 (k=23), A317324 k=(24), A317325 (k=25), A317326 (k=26).

Programs

A195159 Multiples of 7 and odd numbers interleaved.

Original entry on oeis.org

0, 1, 7, 3, 14, 5, 21, 7, 28, 9, 35, 11, 42, 13, 49, 15, 56, 17, 63, 19, 70, 21, 77, 23, 84, 25, 91, 27, 98, 29, 105, 31, 112, 33, 119, 35, 126, 37, 133, 39, 140, 41, 147, 43, 154, 45, 161, 47, 168, 49, 175, 51, 182, 53, 189, 55, 196, 57, 203, 59, 210, 61
Offset: 0

Views

Author

Omar E. Pol, Sep 10 2011

Keywords

Comments

This is 7*n if n is even, n if n is odd, if n>=0.
Partial sums give the generalized 11-gonal (or hendecagonal) numbers A195160.
a(n) is also the length of the n-th line segment of the rectangular spiral whose vertices are the generalized 11-gonal numbers. - Omar E. Pol, Jul 27 2018

Crossrefs

Cf. A008589 and A005408 interleaved.
Column k=7 of A195151.
Cf. Sequences whose partial sums give the generalized n-gonal numbers, if n>=5: A026741, A001477, zero together with A080512, A022998, A195140, zero together with A165998, this sequence, A195161.

Programs

Formula

a(2n) = 7n, a(2n+1) = 2n+1. [corrected by Omar E. Pol, Jul 26 2018]
From Bruno Berselli, Sep 14 2011: (Start)
G.f.: x*(1+7*x+x^2)/((1-x)^2*(1+x)^2).
a(n) = (5*(-1)^n+9)*n/4.
a(n) + a(n-1) = A056020(n). (End)
Multiplicative with a(2^e) = 7*2^(e-1), a(p^e) = p^e for odd prime p. - Andrew Howroyd, Jul 23 2018
Dirichlet g.f.: zeta(s-1) * (1 + 5/2^s). - Amiram Eldar, Oct 25 2023

A195312 Multiples of 9 and odd numbers interleaved.

Original entry on oeis.org

0, 1, 9, 3, 18, 5, 27, 7, 36, 9, 45, 11, 54, 13, 63, 15, 72, 17, 81, 19, 90, 21, 99, 23, 108, 25, 117, 27, 126, 29, 135, 31, 144, 33, 153, 35, 162, 37, 171, 39, 180, 41, 189, 43, 198, 45, 207, 47, 216, 49, 225, 51, 234, 53, 243, 55, 252, 57, 261, 59, 270, 61
Offset: 0

Views

Author

Omar E. Pol, Sep 14 2011

Keywords

Comments

Partial sums give the generalized 13-gonal (or tridecagonal) numbers A195313.
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 13-gonal numbers. - Omar E. Pol, Jul 27 2018

Crossrefs

Column 9 of A195151.
Sequences whose partial sums give the generalized n-gonal numbers, if n>=5: A026741, A001477, zero together with A080512, A022998, A195140, zero together with A165998, A195159, A195161, this sequence.

Programs

  • Magma
    /* By definition */ &cat[[9*n,2*n+1]: n in [0..33]]; // Bruno Berselli, Sep 16 2011
    
  • Mathematica
    With[{nn=30},Riffle[9Range[0,nn],Range[1,2nn+1,2]]] (* Harvey P. Dale, Sep 24 2011 *)
  • PARI
    a(n)=(7*(-1)^n+11)*n/4 \\ Charles R Greathouse IV, Oct 07 2015

Formula

From Bruno Berselli, Sep 15 2011: (Start)
G.f.: x*(1+9*x+x^2)/((1-x)^2*(1+x)^2).
a(n) = (7*(-1)^n+11)*n/4.
a(n) + a(n-1) = A175885(n).
Sum_{i=0..n} a(i) = A195313(n). (End)
Multiplicative with a(2^e) = 9*2^(e-1), a(p^e) = p^e for odd prime p. - Andrew Howroyd, Jul 23 2018
Dirichlet g.f.: zeta(s-1) * (1 + 7/2^s). - Amiram Eldar, Oct 25 2023
E.g.f.: x*(cosh(x) + 9*sinh(x)/2). - Stefano Spezia, Jun 12 2025

A195817 Multiples of 10 and odd numbers interleaved.

Original entry on oeis.org

0, 1, 10, 3, 20, 5, 30, 7, 40, 9, 50, 11, 60, 13, 70, 15, 80, 17, 90, 19, 100, 21, 110, 23, 120, 25, 130, 27, 140, 29, 150, 31, 160, 33, 170, 35, 180, 37, 190, 39, 200, 41, 210, 43, 220, 45, 230, 47, 240, 49, 250, 51, 260, 53, 270, 55, 280, 57, 290, 59, 300
Offset: 0

Views

Author

Omar E. Pol, Sep 29 2011

Keywords

Comments

A008592 and A005408 interleaved.
Partial sums give the generalized 14-gonal (or tetradecagonal) numbers A195818.
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 14-gonal numbers. - Omar E. Pol, Jul 27 2018

Crossrefs

Column 10 of A195151.
Sequences whose partial sums give the generalized n-gonal numbers, if n>=5: A026741, A001477, zero together with A080512, A022998, A195140, zero together with A165998, A195159, A195161, A195312, this sequence.

Programs

  • Magma
    [(2*(-1)^n+3)*n: n in [0..60]]; // Vincenzo Librandi, Sep 30 2011
    
  • Mathematica
    With[{nn=30},Riffle[10*Range[0,nn],Range[1,2*nn+1,2]]] (* or *) LinearRecurrence[{0,2,0,-1},{0,1,10,3},70] (* Harvey P. Dale, Nov 24 2013 *)
  • PARI
    a(n) = (2*(-1)^n+3)*n; \\ Andrew Howroyd, Jul 23 2018

Formula

a(n) = (2*(-1)^n+3)*n. - Vincenzo Librandi, Sep 30 2011
From Bruno Berselli, Sep 30 2011: (Start)
G.f.: x*(1+10*x+x^2)/((1-x)^2*(1+x)^2).
a(n) = -a(-n) = a(n-2)*n/(n-2) = 2*a(n-2)-a(n-4).
a(n) * a(n+1) = a(n(n+1)).
a(n) + a(n+1) = A091998(n+1). (End)
a(0)=0, a(1)=1, a(2)=10, a(3)=3, a(n)=2*a(n-2)-a(n-4). - Harvey P. Dale, Nov 24 2013
Multiplicative with a(2^e) = 5*2^e, a(p^e) = p^e for odd prime p. - Andrew Howroyd, Jul 23 2018
Dirichlet g.f.: zeta(s-1) * (1 + 2^(3-s)). - Amiram Eldar, Oct 25 2023

A126246 a(n) is the number of Fibonacci numbers among (F(1),F(2),F(3),...,F(n)) which are coprime to F(n), where F(n) is the n-th Fibonacci number.

Original entry on oeis.org

1, 2, 2, 3, 4, 4, 6, 6, 6, 8, 10, 6, 12, 12, 8, 12, 16, 12, 18, 12, 12, 20, 22, 12, 20, 24, 18, 18, 28, 16, 30, 24, 20, 32, 24, 18, 36, 36, 24, 24, 40, 24, 42, 30, 24, 44, 46, 24, 42, 40, 32, 36, 52, 36, 40, 36, 36, 56, 58, 24, 60, 60, 36, 48, 48, 40, 66, 48, 44, 48, 70, 36, 72
Offset: 1

Views

Author

Leroy Quet, Mar 08 2007

Keywords

Examples

			F(12) = 144. The six Fibonacci numbers which are coprime to 144 and are <= 144 are F(1) = 1, F(2) = 1, F(5) = 5, F(7) = 13, F(10) = 55 and F(11) = 89. So a(12) = 6.
The six numbers k = 1, 2, 5, 7, 10 and 11 are <= 12 and satisfy gcd(k,12) divides 2. So a(12) = 6. - _Peter Bala_, Dec 31 2023
		

Crossrefs

Programs

  • Maple
    with(combinat): a:=proc(n) local ct,i: ct:=0: for i from 1 to n do if gcd(fibonacci(i),fibonacci(n))=1 then ct:=ct+1 else ct:=ct fi: od: ct: end: seq(a(n),n=1..90); # Emeric Deutsch, Mar 24 2007
    # alternative program based on the above
    with(numtheory): a := proc(n) local ct, i: ct := 0: for i from 1 to n do if gcd(i,n) in divisors(2) then ct := ct + 1 else ct := ct fi: od: ct: end: seq(a(n), n = 1..90); # Peter Bala, Dec 31 2023
  • Mathematica
    Table[Count[CoprimeQ[Fibonacci[n],#]&/@Fibonacci[Range[n]],True],{n,80}] (* Harvey P. Dale, Mar 09 2013 *)
    a[n_] := {1, 2, 1, 3/2}[[Mod[n, 4, 1]]]*EulerPhi[n]; Array[a, 100] (* Amiram Eldar, Aug 21 2023 *)
  • PARI
    a(n) = sum(k=1, n, gcd(fibonacci(k), fibonacci(n)) == 1); \\ Michel Marcus, Nov 13 2017

Formula

Equals A054523 * (1, 1, 0, 0, 0, ...). - Gary W. Adamson, Apr 17 2007
From Jud McCranie, Nov 11 2017: (Start)
Multiplicative with a(p^e) = phi(p^e) = p^(e-1)*(p - 1), except when p = 2, then a(2) = 2, because F(1) = F(2) = 1 and a(2^e) = 3*(2^(e-2)), (e > 1, all smaller Fibonacci numbers are coprime, except ones that are multiples of 3, i.e., every 4th one).
If n is odd, then a(n) = phi(n) (Euler's totient function).
If n is a multiple of 4 then a(n) = 3*phi(n)/2.
If n is congruent to 2 mod 4 then a(n) = 2*phi(n). (End)
From Amiram Eldar, Aug 21 2023: (Start)
Dirichlet g.f.: (1 + 1/2^s) * zeta(s-1)/zeta(s).
Sum_{k = 1..n} a(k) ~ c * n^2, where c = 15/(4*Pi^2) = 0.379954... . (End)
From Peter Bala, Dec 31 2023: (Start)
a(n) = Sum_{k = 1..n, gcd(k,n) = 1 or 2} 1 (since gcd(F(k),F(n)) = F(gcd(k,n)) = 1 iff gcd(k,n) = 1 or 2). Cf. phi(n) = A000010(n) = Sum_{k = 1..n, gcd(k,n) = 1} 1. See also A345082.
Sum_{d divides n} a(d) = n if n is odd, else 3*n/2 if n is even. See A080512.
The Lambert series Sum_{n >= 1} a(n)*x^n/(1 - x^n) = (1 + 3*x + x^2)/(1 - x^2)^2.
If n divides m then a(n) divides 2*a(m). (End)
a(n) = Sum_{d|gcd(n,2)} phi(n/d). - Ridouane Oudra, May 06 2025

Extensions

More terms from Emeric Deutsch, Mar 24 2007
More terms from Gary W. Adamson, Apr 17 2007

A317311 Multiples of 11 and odd numbers interleaved.

Original entry on oeis.org

0, 1, 11, 3, 22, 5, 33, 7, 44, 9, 55, 11, 66, 13, 77, 15, 88, 17, 99, 19, 110, 21, 121, 23, 132, 25, 143, 27, 154, 29, 165, 31, 176, 33, 187, 35, 198, 37, 209, 39, 220, 41, 231, 43, 242, 45, 253, 47, 264, 49, 275, 51, 286, 53, 297, 55, 308, 57, 319, 59, 330, 61, 341, 63, 352, 65, 363, 67, 374, 69
Offset: 0

Views

Author

Omar E. Pol, Jul 25 2018

Keywords

Comments

Partial sums give the generalized 15-gonal numbers (A277082).
a(n) is also the length of the n-th line segment of the rectangular spiral wh0se vertices are the generalized 15-gonal numbers.

Crossrefs

Cf. A008593 and A005408 interleaved.
Column 11 of A195151.
Sequences whose partial sums give the generalized k-gonal numbers: A026741 (k=5), A001477 (k=6), zero together with A080512 (k=7), A022998 (k=8), A195140 (k=9), zero together with A165998 (k=10), A195159 (k=11), A195161 (k=12), A195312 (k=13), A195817 (k=14).
Cf. A277082.

Programs

  • Mathematica
    {0}~Join~Riffle[2 Range@ # - 1, 11 Range@ #] &@ 35 (* or *)
    CoefficientList[Series[x (1 + 11 x + x^2)/((1 - x)^2*(1 + x)^2), {x, 0, 69}], x] (* Michael De Vlieger, Jul 26 2018 *)
    LinearRecurrence[{0,2,0,-1},{0,1,11,3},90] (* Harvey P. Dale, Aug 28 2022 *)
  • PARI
    concat(0, Vec(x*(1 + 11*x + x^2) / ((1 - x)^2*(1 + x)^2) + O(x^40))) \\ Colin Barker, Jul 26 2018

Formula

a(2n) = 11*n, a(2n+1) = 2*n + 1.
From Colin Barker, Jul 26 2018: (Start)
G.f.: x*(1 + 11*x + x^2) / ((1 - x)^2*(1 + x)^2).
a(n) = 2*a(n-2) - a(n-4) for n>3. (End)
Multiplicative with a(2^e) = 11*2^(e-1), and a(p^e) = p^e for an odd prime p. - Amiram Eldar, Oct 14 2023
Dirichlet g.f.: zeta(s-1) * (1 + 9/2^s). - Amiram Eldar, Oct 25 2023
a(n) = (13 + 9*(-1)^n)*n/4. - Aaron J Grech, Aug 20 2024
Showing 1-10 of 35 results. Next