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.

Previous Showing 11-20 of 30 results. Next

A188135 a(n) = 8*n^2 + 2*n + 1.

Original entry on oeis.org

1, 11, 37, 79, 137, 211, 301, 407, 529, 667, 821, 991, 1177, 1379, 1597, 1831, 2081, 2347, 2629, 2927, 3241, 3571, 3917, 4279, 4657, 5051, 5461, 5887, 6329, 6787, 7261, 7751, 8257, 8779, 9317, 9871, 10441, 11027, 11629, 12247, 12881, 13531, 14197, 14879, 15577, 16291, 17021, 17767
Offset: 0

Views

Author

Paul Curtz, Mar 30 2011

Keywords

Comments

Bisection of A193867. - Omar E. Pol, Aug 16 2011
Sequence found by reading the line from 1, in the direction 1, 11, ..., in the square spiral whose vertices are the triangular numbers A000217. - Omar E. Pol, Sep 04 2011

Crossrefs

Programs

Formula

First differences: a(n) - a(n-1) = 16*n - 6 = A113770(n) = 2*A004770(n).
Second differences: a(n) - 2*a(n-1) + a(n-2) = 16.
a(n) = 3*a(n-1) - 3*a(n-2) + a(n-3).
From R. J. Mathar, Apr 06 2011: (Start)
G.f.: -(1+x)*(7*x+1)/(x-1)^3.
a(n) = A084849(2*n). (End)
E.g.f.: exp(x)*(1 + 10*x + 8*x^2). - Elmo R. Oliveira, Oct 19 2024

Extensions

a(41)-a(47) from Elmo R. Oliveira, Oct 19 2024

A352744 Array read by ascending antidiagonals. Generalized Fibonacci numbers F(n, k) = (psi^k*(phi - n) - phi^k*(psi - n)) / (phi - psi) where phi = (1 + sqrt(5))/2 and psi = (1 - sqrt(5))/2. F(n, k) for n >= 0 and k >= 0.

Original entry on oeis.org

1, 1, 0, 1, 1, 1, 1, 2, 2, 1, 1, 3, 3, 3, 2, 1, 4, 4, 5, 5, 3, 1, 5, 5, 7, 8, 8, 5, 1, 6, 6, 9, 11, 13, 13, 8, 1, 7, 7, 11, 14, 18, 21, 21, 13, 1, 8, 8, 13, 17, 23, 29, 34, 34, 21, 1, 9, 9, 15, 20, 28, 37, 47, 55, 55, 34, 1, 10, 10, 17, 23, 33, 45, 60, 76, 89, 89, 55
Offset: 0

Views

Author

Peter Luschny, Apr 01 2022

Keywords

Comments

The definition declares the Fibonacci numbers for all integers n and k. An alternative version is A353595.
The identity F(n, k) = (-1)^k*F(1 - n, -k) holds for all integers n, k. Proof:
F(n, k)*(2+phi) = (phi^k*(n*phi + 1) - (-phi)^(-k)*((n-1)*phi - 1))
= (-1)^k*(phi^(-k)*((1-n)*phi+1) - (-phi)^k*(-n*phi-1))
= (-1)^k*F(1-n, -k)*(2+phi).
This identity can be seen as an extension of Cassini's theorem of 1680 and of an identity given by Graham, Knuth and Patashnik in 'Concrete Mathematics' (6.106 and 6.107). The beginning of the full array with arguments in Z x Z can be found in the linked note.
The enumeration is the result of the simple form of the chosen definition. The classical positive Fibonacci numbers starting with 1, 1, 2, 3,... are in row n = 1 with offset 0. The nonnegative Fibonacci numbers starting 0, 1, 1, 2, 3,... are in row 0 with offset 1. They prolong towards -infinity with an index shifted by 1 compared to the enumeration used by Knuth. A characteristic of our enumeration is F(n, 0) = 1 for all integer n.
Fibonacci numbers vanish only for (n,k) in {(-1,2), (0,1), (1,-1), (2,-2)}. The zeros correspond to the identities (phi + 1)*psi^2 = (psi + 1)*phi^2, psi*phi = phi*psi, (phi - 1)*phi = (psi - 1)*psi and (phi - 2)*phi^2 = (psi - 2)*psi^2.
For divisibility properties see A352747.
For any fixed k, the sequence F(n, k) is a linear function of n. In other words, an arithmetic progression. This implies that F(n+1, k) = 2*F(n, k) - F(n-1, k) for all n in Z. Special case of this is Fibonacci(n+1) = 2 *Fibonacci(n) - Fibonacci(n-2). - Michael Somos, May 08 2022

Examples

			Array starts:
n\k 0, 1,  2,  3,  4,  5,  6,   7,   8,   9, ...
---------------------------------------------------------
[0] 1, 0,  1,  1,  2,  3,  5,   8,  13,  21, ... A212804
[1] 1, 1,  2,  3,  5,  8, 13,  21,  34,  55, ... A000045 (shifted once)
[2] 1, 2,  3,  5,  8, 13, 21,  34,  55,  89, ... A000045 (shifted twice)
[3] 1, 3,  4,  7, 11, 18, 29,  47,  76, 123, ... A000032 (shifted once)
[4] 1, 4,  5,  9, 14, 23, 37,  60,  97, 157, ... A000285
[5] 1, 5,  6, 11, 17, 28, 45,  73, 118, 191, ... A022095
[6] 1, 6,  7, 13, 20, 33, 53,  86, 139, 225, ... A022096
[7] 1, 7,  8, 15, 23, 38, 61,  99, 160, 259, ... A022097
[8] 1, 8,  9, 17, 26, 43, 69, 112, 181, 293, ... A022098
[9] 1, 9, 10, 19, 29, 48, 77, 125, 202, 327, ... A022099
		

References

  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, sec. 6.6.
  • Donald Ervin Knuth, The Art of Computer Programming, Third Edition, Vol. 1, Fundamental Algorithms. Chapter 1.2.8 Fibonacci Numbers. Addison-Wesley, Reading, MA, 1997.

Crossrefs

Diagonals: A088209 (main), A007502, A066982 (antidiagonal sums).
Cf. A352747, A353595 (alternative version), A354265 (generalized Lucas numbers).
Similar arrays based on the Catalan and the Bell numbers are A352680 and A352682.

Programs

  • Julia
    # Time complexity is O(lg n).
    function fibrec(n::Int)
        n == 0 && return (BigInt(0), BigInt(1))
        a, b = fibrec(div(n, 2))
        c = a * (b * 2 - a)
        d = a * a + b * b
        iseven(n) ? (c, d) : (d, c + d)
    end
    function Fibonacci(n::Int, k::Int)
        k == 0 && return BigInt(1)
        k  < 0 && return (-1)^k*Fibonacci(1 - n, -k)
        a, b = fibrec(k - 1)
        a + b*n
    end
    for n in -6:6
        println([Fibonacci(n, k) for k in -6:6])
    end
    
  • Maple
    f := n -> combinat:-fibonacci(n + 1): F := (n, k) -> (n-1)*f(k-1) + f(k):
    seq(seq(F(n-k, k), k = 0..n), n = 0..9);
    # The next implementation is for illustration only but is not recommended
    # as it relies on floating point arithmetic.
    phi := (1 + sqrt(5))/2: psi := (1 - sqrt(5))/2:
    F := (n, k) -> (psi^k*(phi - n) - phi^k*(psi - n)) / (phi - psi):
    for n from -6 to 6 do lprint(seq(simplify(F(n, k)), k = -6..6)) od;
  • Mathematica
    Table[LinearRecurrence[{1, 1}, {1, n}, 10], {n, 0, 9}] // TableForm
    F[ n_, k_] := (MatrixPower[{{0, 1}, {1, 1}}, k].{{1}, {n}})[[1, 1]]; (* Michael Somos, May 08 2022 *)
    c := Pi/2 - I*ArcSinh[1/2]; (* Based on a remark from Bill Gosper. *)
    F[n_, k_] := 2 (I (n-1) Sin[k c] + Sin[(k+1) c]) / (I^k Sqrt[5]);
    Table[Simplify[F[n, k]], {n, -6, 6}, {k, -6, 6}] // TableForm (* Peter Luschny, May 10 2022 *)
  • PARI
    F(n, k) = ([0, 1; 1, 1]^k*[1; n])[1, 1]
    
  • PARI
    {F(n, k) = n*fibonacci(k) + fibonacci(k-1)}; /* Michael Somos, May 08 2022 */

Formula

F(n, k) = F(n, k-1) + F(n, k-2) for k >= 2, otherwise 1, n for k = 0, 1.
F(n, k) = (n-1)*f(k-1) + f(k) where f(n) = A000045(n+1), the Fibonacci numbers starting with f(0) = 1.
F(n, k) = ((phi^k*(n*phi + 1) - (-phi)^(-k)*((n - 1)*phi - 1)))/(2 + phi).
F(n, k) = [x^k] (1 + (n - 1)*x)/(1 - x - x^2) for k >= 0.
F(k, n) = [x^k] (F(0, n) + F(0, n-1)*x)/(1 - x)^2 for k >= 0.
F(n, k) = (k!/sqrt(5))*[x^k] ((n-psi)*exp(phi*x) - (n-phi)*exp(psi*x)) for k >= 0.
F(n, k) - F(n-1, k) = sign(k)^(n-1)*f(k) for all n, k in Z, where A000045 is extended to negative integers by f(-n) = (-1)^(n-1)*f(n) (CMath 6.107). - Peter Luschny, May 09 2022
F(n, k) = 2*((n-1)*i*sin(k*c) + sin((k+1)*c))/(i^k*sqrt(5)) where c = Pi/2 - i*arcsinh(1/2), for all n, k in Z. Based on a remark from Bill Gosper. - Peter Luschny, May 10 2022

A047550 Numbers that are congruent to {5, 7} mod 8.

Original entry on oeis.org

5, 7, 13, 15, 21, 23, 29, 31, 37, 39, 45, 47, 53, 55, 61, 63, 69, 71, 77, 79, 85, 87, 93, 95, 101, 103, 109, 111, 117, 119, 125, 127, 133, 135, 141, 143, 149, 151, 157, 159, 165, 167, 173, 175, 181, 183, 189, 191, 197, 199, 205, 207, 213, 215, 221, 223, 229, 231, 237, 239, 245, 247, 253, 255, 261
Offset: 1

Views

Author

Keywords

Crossrefs

Union of A004770 and A004771.

Programs

  • Maple
    A047550:=n->4*n-(-1)^n; seq(A047550(n), n=1..100); # Wesley Ivan Hurt, Mar 31 2014
  • Mathematica
    With[{r8=8*Range[0,40]},Sort[Join[r8+5,r8+7]]] (* or *) LinearRecurrence[ {1,1,-1},{5,7,13},80] (* Harvey P. Dale, Jun 04 2012 *)
    Table[4 n - (-1)^n, {n, 100}] (* Wesley Ivan Hurt, Mar 31 2014 *)
  • PARI
    Vec(x*(5+2*x+x^2)/((1-x)^2*(1+x)) + O(x^100)) \\ Colin Barker, Aug 26 2016

Formula

a(n) = 8*n-a(n-1)-4 (with a(1)=5). - Vincenzo Librandi, Aug 06 2010
a(n) = 4*n-(-1)^n. - Rolf Pleisch, Nov 02 2010
a(1)=5, a(2)=7, a(3)=13; for n>3, a(n) = a(n-1)+a(n-2)-a(n-3). - Harvey P. Dale, Jun 04 2012
G.f.: x*(5+2*x+x^2) / ((1-x)^2*(1+x)). - Colin Barker, Aug 26 2016
Sum_{n>=1} (-1)^(n+1)/a(n) = Pi/8 - sqrt(2)*log(sqrt(2)+1)/4. - Amiram Eldar, Dec 19 2021
E.g.f.: 1 + 4*x*exp(x) - exp(-x). - David Lovler, Sep 02 2022

Extensions

More terms from Vincenzo Librandi, Aug 06 2010

A175461 Semiprimes of form 8n+5.

Original entry on oeis.org

21, 69, 77, 85, 93, 133, 141, 205, 213, 221, 237, 253, 301, 309, 341, 365, 381, 413, 437, 445, 453, 469, 485, 493, 501, 517, 533, 565, 573, 581, 589, 597, 629, 669, 685, 717, 749, 781, 789, 813, 869, 893, 901, 917, 933, 949, 965, 973, 989, 1037, 1077, 1101
Offset: 1

Views

Author

Zak Seidov, May 23 2010

Keywords

Comments

There are no squares of form 8n+5.

Crossrefs

Cf. A001358 Semiprimes: products of two primes, A004770 Numbers of form 8n+5, A007521 Primes of form 8n+5, A175462 Number of divisors of integers of form 8n+5, A175463 Numbers n such that 8*n+5 is semiprime.

Programs

  • Mathematica
    Select[8*Range[200]+5,PrimeOmega[#]==2&] (* Harvey P. Dale, Apr 29 2015 *)
  • PARI
    lista(nn) = {vec = vector(nn, i, 8*i+5); smp = select(i->(bigomega(i) == 2), vec); print(smp);} \\ Michel Marcus, Oct 15 2013

A082285 a(n) = 16*n + 13.

Original entry on oeis.org

13, 29, 45, 61, 77, 93, 109, 125, 141, 157, 173, 189, 205, 221, 237, 253, 269, 285, 301, 317, 333, 349, 365, 381, 397, 413, 429, 445, 461, 477, 493, 509, 525, 541, 557, 573, 589, 605, 621, 637, 653, 669, 685, 701, 717, 733, 749, 765, 781, 797, 813, 829, 845
Offset: 0

Views

Author

Cino Hilliard, May 10 2003

Keywords

Comments

Solutions to (7^x + 11^x) mod 17 = 13.
a(n-2), n>=2, gives the second column in triangle A238476 related to the Collatz problem. - Wolfdieter Lang, Mar 12 2014

Crossrefs

Programs

  • Magma
    [[ n : n in [1..1000] | n mod 16 eq 13]]; // Vincenzo Librandi, Oct 10 2011
  • Mathematica
    Range[13, 1000, 16] (* Vladimir Joseph Stephan Orlovsky, May 31 2011 *)
    LinearRecurrence[{2,-1},{13,29},60] (* Harvey P. Dale, Jan 28 2023 *)
  • PARI
    \\ solutions to 7^x+11^x == 13 mod 17
    anpbn(n) = { for(x=1,n, if((7^x+11^x-13)%17==0,print1(x" "))) }
    

Formula

a(n) = 16*n + 13.
a(n) = 32*n - a(n-1) + 10; a(0)=13. - Vincenzo Librandi, Oct 10 2011
From Stefano Spezia, Dec 27 2019: (Start)
O.g.f.: (13 + 3*x)/(1 - x)^2.
E.g.f.: exp(x)*(13 + 16*x). (End)
a(n) = A008594(n+1) + A016813(n+1) - 4. - Leo Tavares, Sep 22 2022
From Elmo R. Oliveira, Apr 12 2025: (Start)
a(n) = 2*a(n-1) - a(n-2).
a(n) = A004770(2*n+2). (End)

A110534 Number of ways of writing 8n+5 as a sum of 5 odd squares.

Original entry on oeis.org

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

Views

Author

Philippe Deléham, Sep 03 2005

Keywords

Comments

a(n) is also the number of ways of writing n as a sum of 5 triangular numbers (A000217). - Kenny Lau, Jul 05 2016

Crossrefs

Cf. A004770.

Programs

  • Python
    f = open('b110534.txt', 'w')
    N = 20000
    n = 1
    t = [0]  #triangular numbers
    while t[-1] <= N:
        t += [t[-1]+n]
        n += 1
    t = t[:-1]
    a = [0]*(N+1)  #the sequence
    length = len(t)
    for i in range(length):
        for j in range(i,length):
            p = t[i] + t[j]
            if p > N: continue
            for k in range(j,length):
                q = p + t[k]
                if q > N: continue
                for l in range(k,length):
                    r = q + t[l]
                    if r > N: continue
                    for m in range(l,length):
                        s = r + t[m]
                        if s > N: break
                        else: a[s] += 1
    for index,value in enumerate(a):
        f.write(str(index)+" "+str(value)+"\n")
    f.close()
    # Kenny Lau, Jul 05 2016

Extensions

More terms from Don Reble, Sep 17 2005

A115391 a(0)=0; then a(4*k+1)=a(4*k)+(4*k+1)^2, a(4*k+2)=a(4*k+1)+(4*k+3)^2, a(4*k+3)=a(4*k+2)+(4*k+2)^2, a(4*k+4)=a(4*k+3)+(4*k+4)^2.

Original entry on oeis.org

0, 1, 10, 14, 30, 55, 104, 140, 204, 285, 406, 506, 650, 819, 1044, 1240, 1496, 1785, 2146, 2470, 2870, 3311, 3840, 4324, 4900, 5525, 6254, 6930, 7714, 8555, 9516, 10416, 11440, 12529, 13754, 14910, 16206, 17575, 19096, 20540, 22140, 23821, 25670, 27434, 29370
Offset: 0

Views

Author

Pierre CAMI, Mar 15 2006

Keywords

Comments

Probable answer to the riddle in A115603.
Partial sums of the squares of the terms of A116966.

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{2,-1,0,2,-4,2,0,-1,2,-1},{0,1,10,14,30,55,104,140,204,285,406},50] (* Harvey P. Dale, Jul 01 2020 *)

Formula

G.f.: x*(4*x^7-3*x^6+8*x^5+7*x^4+12*x^3-5*x^2+8*x+1) / ((x-1)^4*(x+1)^2*(x^2+1)^2). - Colin Barker, Jul 18 2013
a(n) = (2*n+1)*(2*n*(n+1)+3*(1+cos(n*Pi)-2*cos(n*Pi/2)))/12. - Luce ETIENNE, Feb 01 2017

Extensions

More terms from Stefan Steinerberger, Mar 31 2006
Entry revised by Don Reble, Apr 06 2006
More terms from Colin Barker, Jul 18 2013
Offset adapted to definition by Georg Fischer, Jun 18 2021

A004776 Numbers not congruent to 5 (mod 8).

Original entry on oeis.org

0, 1, 2, 3, 4, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 17, 18, 19, 20, 22, 23, 24, 25, 26, 27, 28, 30, 31, 32, 33, 34, 35, 36, 38, 39, 40, 41, 42, 43, 44, 46, 47, 48, 49, 50, 51, 52, 54, 55, 56, 57, 58, 59, 60, 62, 63, 64, 65, 66, 67, 68, 70, 71, 72, 73, 74, 75, 76, 78
Offset: 1

Views

Author

Keywords

Comments

Also, numbers whose binary expansion does not end in 101.
Numbers that are congruent to {0, 1, 2, 3, 4, 6, 7} mod 8. - Wesley Ivan Hurt, Jul 22 2016

Crossrefs

Cf. A004770 (complement), A045323 (primes).

Programs

Formula

Numbers that are congruent to {0, 1, 2, 3, 4, 6, 7} mod 8.
G.f.: x^2*(1+x+x^2+x^3+2*x^4+x^5+x^6) / ((x^6+x^5+x^4+x^3+x^2+x+1)*(x-1)^2). - R. J. Mathar, Oct 25 2011
a(n) = n + floor((n-6)/7). - M. F. Hasler, Nov 02 2013
From Wesley Ivan Hurt, Jul 22 2016: (Start)
a(n) = a(n-1) + a(n-7) - a(n-8) for n>8; a(n) = a(n-7) + 8 for n>7.
a(n) = (56*n - 63 + (n mod 7) - 6*((n+1) mod 7) + ((n+2) mod 7) + ((n+3) mod 7) + ((n+4) mod 7) + ((n+5) mod 7) + ((n+6) mod 7))/49.
a(7k) = 8k-1, a(7k-1) = 8k-2, a(7k-2) = 8k-4, a(7k-3) = 8k-5, a(7k-4) = 8k-6, a(7k-5) = 8k-7, a(7k-6) = 8k-8. (End)

Extensions

Edited by M. F. Hasler, Nov 02 2013

A017126 a(n) = (8*n + 5)^2.

Original entry on oeis.org

25, 169, 441, 841, 1369, 2025, 2809, 3721, 4761, 5929, 7225, 8649, 10201, 11881, 13689, 15625, 17689, 19881, 22201, 24649, 27225, 29929, 32761, 35721, 38809, 42025, 45369, 48841, 52441, 56169, 60025, 64009, 68121, 72361, 76729, 81225, 85849, 90601, 95481, 100489, 105625
Offset: 0

Views

Author

Keywords

Crossrefs

Cf. A004770.

Programs

Formula

G.f.: ( -25 - 94*x - 9*x^2 ) / (x-1)^3. - R. J. Mathar, May 08 2015
E.g.f.: exp(x)*(25 + 144*x + 64*x^2). - Stefano Spezia, Oct 28 2023

A047608 Numbers that are congruent to {4, 5} mod 8.

Original entry on oeis.org

4, 5, 12, 13, 20, 21, 28, 29, 36, 37, 44, 45, 52, 53, 60, 61, 68, 69, 76, 77, 84, 85, 92, 93, 100, 101, 108, 109, 116, 117, 124, 125, 132, 133, 140, 141, 148, 149, 156, 157, 164, 165, 172, 173, 180, 181, 188, 189, 196, 197, 204, 205, 212, 213, 220, 221, 228, 229
Offset: 1

Views

Author

Keywords

Crossrefs

Union of A017113 and A004770.

Programs

  • Mathematica
    Select[Range[230], MemberQ[{4, 5}, Mod[#, 8]] &] (* Amiram Eldar, Dec 19 2021 *)
  • PARI
    a(n) = 4*n - 3*(1 + (-1)^n)/2 \\ David Lovler, Aug 20 2022

Formula

G.f.: x*(4+x+3*x^2) / ( (1+x)*(x-1)^2 ). - R. J. Mathar, Sep 22 2016
a(n) = 4n - 3*(1 + (-1)^n)/2 or a(n) = 4n - 3*((n-1) mod 2). - Heinz Ebert, Jul 12 2021
Sum_{n>=1} (-1)^(n+1)/a(n) = (sqrt(2)-1)*Pi/16 - log(2)/4 + sqrt(2)*log(sqrt(2)+1)/8. - Amiram Eldar, Dec 19 2021
E.g.f.: 3 + ((8*x - 3)*exp(x) - 3*exp(-x))/2. - David Lovler, Aug 20 2022
Previous Showing 11-20 of 30 results. Next