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

A113501 Indices of prime NSW numbers A088165.

Original entry on oeis.org

1, 2, 3, 9, 14, 23, 29, 81, 128, 210, 468, 473, 746, 950, 3344, 4043, 4839, 14376, 39521, 64563, 72984, 82899, 84338, 85206, 86121, 139160
Offset: 1

Views

Author

Eric W. Weisstein, Jan 09 2006

Keywords

Comments

Very closely related to indices of prime Pell-Lucas numbers (A099088).
a(27) > 221400. - Robert Price, Mar 29 2019

Examples

			NSW(1) = 7, NSW(2) = 41, NSW(3) = 239, NSW(9) = 9369319, ...
		

Crossrefs

Programs

Extensions

a(19)-a(20) from Eric W. Weisstein, May 22 2006
a(21) from Eric W. Weisstein, Aug 29 2006
a(22) from Eric W. Weisstein, Nov 11 2006
a(23) from Eric W. Weisstein, Nov 26 2006
a(24) from Eric W. Weisstein, Dec 10 2006
a(25) from Eric W. Weisstein, Jan 25 2007
a(26) from Robert Price, Dec 07 2018

A001333 Pell-Lucas numbers: numerators of continued fraction convergents to sqrt(2).

Original entry on oeis.org

1, 1, 3, 7, 17, 41, 99, 239, 577, 1393, 3363, 8119, 19601, 47321, 114243, 275807, 665857, 1607521, 3880899, 9369319, 22619537, 54608393, 131836323, 318281039, 768398401, 1855077841, 4478554083, 10812186007, 26102926097, 63018038201, 152139002499, 367296043199
Offset: 0

Views

Author

Keywords

Comments

Number of n-step non-selfintersecting paths starting at (0,0) with steps of types (1,0), (-1,0) or (0,1) [Stanley].
Number of n steps one-sided prudent walks with east, west and north steps. - Shanzhen Gao, Apr 26 2011
Number of ternary strings of length n-1 with subwords (0,2) and (2,0) not allowed. - Olivier Gérard, Aug 28 2012
Number of symmetric 2n X 2 or (2n-1) X 2 crossword puzzle grids: all white squares are edge connected; at least 1 white square on every edge of grid; 180-degree rotational symmetry. - Erich Friedman
a(n+1) is the number of ways to put molecules on a 2 X n ladder lattice so that the molecules do not touch each other.
In other words, a(n+1) is the number of independent vertex sets and vertex covers in the n-ladder graph P_2 X P_n. - Eric W. Weisstein, Apr 04 2017
Number of (n-1) X 2 binary arrays with a path of adjacent 1's from top row to bottom row, see A359576. - R. H. Hardin, Mar 16 2002
a(2*n+1) with b(2*n+1) := A000129(2*n+1), n >= 0, give all (positive integer) solutions to Pell equation a^2 - 2*b^2 = -1.
a(2*n) with b(2*n) := A000129(2*n), n >= 1, give all (positive integer) solutions to Pell equation a^2 - 2*b^2 = +1 (see Emerson reference).
Bisection: a(2*n) = T(n,3) = A001541(n), n >= 0 and a(2*n+1) = S(2*n,2*sqrt(2)) = A002315(n), n >= 0, with T(n,x), resp. S(n,x), Chebyshev's polynomials of the first, resp. second kind. See A053120, resp. A049310.
Binomial transform of A077957. - Paul Barry, Feb 25 2003
For n > 0, the number of (s(0), s(1), ..., s(n)) such that 0 < s(i) < 4 and |s(i) - s(i-1)| <= 1 for i = 1,2,...,n, s(0) = 2, s(n) = 2. - Herbert Kociemba, Jun 02 2004
For n > 1, a(n) corresponds to the longer side of a near right-angled isosceles triangle, one of the equal sides being A000129(n). - Lekraj Beedassy, Aug 06 2004
Exponents of terms in the series F(x,1), where F is determined by the equation F(x,y) = xy + F(x^2*y,x). - Jonathan Sondow, Dec 18 2004
Number of n-words from the alphabet A={0,1,2} which two neighbors differ by at most 1. - Fung Cheok Yin (cheokyin_restart(AT)yahoo.com.hk), Aug 30 2006
Consider the mapping f(a/b) = (a + 2b)/(a + b). Taking a = b = 1 to start with and carrying out this mapping repeatedly on each new (reduced) rational number gives the following sequence 1/1, 3/2, 7/5, 17/12, 41/29, ... converging to 2^(1/2). Sequence contains the numerators. - Amarnath Murthy, Mar 22 2003 [Amended by Paul E. Black (paul.black(AT)nist.gov), Dec 18 2006]
Odd-indexed prime numerators are prime RMS numbers (A140480) and also NSW primes (A088165). - Ctibor O. Zizka, Aug 13 2008
The intermediate convergents to 2^(1/2) begin with 4/3, 10/7, 24/17, 58/41; essentially, numerators=A052542 and denominators here. - Clark Kimberling, Aug 26 2008
Equals right border of triangle A143966. Starting (1, 3, 7, ...) equals INVERT transform of (1, 2, 2, 2, ...) and row sums of triangle A143966. - Gary W. Adamson, Sep 06 2008
Inverse binomial transform of A006012; Hankel transform is := [1, 2, 0, 0, 0, 0, 0, 0, 0, ...]. - Philippe Deléham, Dec 04 2008
From Charlie Marion, Jan 07 2009: (Start)
In general, denominators, a(k,n) and numerators, b(k,n), of continued fraction convergents to sqrt((k+1)/k) may be found as follows:
let a(k,0) = 1, a(k,1) = 2k; for n>0, a(k,2n) = 2*a(k,2n-1) + a(k,2n-2) and a(k,2n+1) = (2k)*a(k,2n) + a(k,2n-1);
let b(k,0) = 1, b(k,1) = 2k+1; for n>0, b(k,2n) = 2*b(k,2n-1) + b(k,2n-2) and b(k,2n+1) = (2k)*b(k,2n) + b(k,2n-1).
For example, the convergents to sqrt(2/1) start 1/1, 3/2, 7/5, 17/12, 41/29.
In general, if a(k,n) and b(k,n) are the denominators and numerators, respectively, of continued fraction convergents to sqrt((k+1)/k) as defined above, then
k*a(k,2n)^2 - a(k,2n-1)*a(k,2n+1) = k = k*a(k,2n-2)*a(k,2n) - a(k,2n-1)^2 and
b(k,2n-1)*b(k,2n+1) - k*b(k,2n)^2 = k+1 = b(k,2n-1)^2 - k*b(k,2n-2)*b(k,2n);
for example, if k=1 and n=3, then b(1,n)=a(n+1) and
1*a(1,6)^2 - a(1,5)*a(1,7) = 1*169^2 - 70*408 = 1;
1*a(1,4)*a(1,6) - a(1,5)^2 = 1*29*169 - 70^2 = 1;
b(1,5)*b(1,7) - 1*b(1,6)^2 = 99*577 - 1*239^2 = 2;
b(1,5)^2 - 1*b(1,4)*b(1,6) = 99^2 - 1*41*239 = 2.
(End)
This sequence occurs in the lower bound of the order of the set of equivalent resistances of n equal resistors combined in series and in parallel (A048211). - Sameen Ahmed Khan, Jun 28 2010
Let M = a triangle with the Fibonacci series in each column, but the leftmost column is shifted upwards one row. A001333 = lim_{n->infinity} M^n, the left-shifted vector considered as a sequence. - Gary W. Adamson, Jul 27 2010
a(n) is the number of compositions of n when there are 1 type of 1 and 2 types of other natural numbers. - Milan Janjic, Aug 13 2010
Equals the INVERTi transform of A055099. - Gary W. Adamson, Aug 14 2010
From L. Edson Jeffery, Apr 04 2011: (Start)
Let U be the unit-primitive matrix (see [Jeffery])
U = U_(8,2) = (0 0 1 0)
(0 1 0 1)
(1 0 2 0)
(0 2 0 1).
Then a(n) = (1/4)*Trace(U^n). (See also A084130, A006012.)
(End)
For n >= 1, row sums of triangle
m/k.|..0.....1.....2.....3.....4.....5.....6.....7
==================================================
.0..|..1
.1..|..1.....2
.2..|..1.....2.....4
.3..|..1.....4.....4.....8
.4..|..1.....4....12.....8....16
.5..|..1.....6....12....32....16....32
.6..|..1.....6....24....32....80....32....64
.7..|..1.....8....24....80....80...192....64...128
which is the triangle for numbers 2^k*C(m,k) with duplicated diagonals. - Vladimir Shevelev, Apr 12 2012
a(n) is also the number of ways to place k non-attacking wazirs on a 2 X n board, summed over all k >= 0 (a wazir is a leaper [0,1]). - Vaclav Kotesovec, May 08 2012
The sequences a(n) and b(n) := A000129(n) are entries of powers of the special case of the Brahmagupta Matrix - for details see Suryanarayan's paper. Further, as Suryanarayan remark, if we set A = 2*(a(n) + b(n))*b(n), B = a(n)*(a(n) + 2*b(n)), C = a(n)^2 + 2*a(n)*b(n) + 2*b(n)^2 we obtain integral solutions of the Pythagorean relation A^2 + B^2 = C^2, where A and B are consecutive integers. - Roman Witula, Jul 28 2012
Pisano period lengths: 1, 1, 8, 4, 12, 8, 6, 4, 24, 12, 24, 8, 28, 6, 24, 8, 16, 24, 40, 12, .... - R. J. Mathar, Aug 10 2012
This sequence and A000129 give the diagonal numbers described by Theon of Smyrna. - Sture Sjöstedt, Oct 20 2012
a(n) is the top left entry of the n-th power of any of the following six 3 X 3 binary matrices: [1, 1, 1; 1, 1, 1; 1, 0, 0] or [1, 1, 1; 1, 1, 0; 1, 1, 0] or [1, 1, 1; 1, 0, 1; 1, 1, 0] or [1, 1, 1; 1, 1, 0; 1, 0, 1] or [1, 1, 1; 1, 0, 1; 1, 0, 1] or [1, 1, 1; 1, 0, 0; 1, 1, 1]. - R. J. Mathar, Feb 03 2014
If p is prime, a(p) == 1 (mod p) (compare with similar comment for A000032). - Creighton Dement, Oct 11 2005, modified by Davide Colazingari, Jun 26 2016
a(n) = A000129(n) + A000129(n-1), where A000129(n) is the n-th Pell Number; e.g., a(6) = 99 = A000129(6) + A000129(5) = 70 + 29. Hence the sequence of fractions has the form 1 + A000129(n-1)/A000129(n), and the ratio A000129(n-1)/A000129(n)converges to sqrt(2) - 1. - Gregory L. Simay, Nov 30 2018
For n > 0, a(n+1) is the length of tau^n(1) where tau is the morphism: 1 -> 101, 0 -> 1. See Song and Wu. - Michel Marcus, Jul 21 2020
For n > 0, a(n) is the number of nonisomorphic quasitrivial semigroups with n elements, see Devillet, Marichal, Teheux. A292932 is the number of labeled quasitrivial semigroups. - Peter Jipsen, Mar 28 2021
a(n) is the permanent of the n X n tridiagonal matrix defined in A332602. - Stefano Spezia, Apr 12 2022
From Greg Dresden, May 08 2023: (Start)
For n >= 2, 4*a(n) is the number of ways to tile this T-shaped figure of length n-1 with two colors of squares and one color of domino; shown here is the figure of length 5 (corresponding to n=6), and it has 4*a(6) = 396 different tilings.
_
|| _
|||_|||
|_|
(End)
12*a(n) = number of walks of length n in the cyclic Kautz digraph CK(3,4). - Miquel A. Fiol, Feb 15 2024

Examples

			Convergents are 1, 3/2, 7/5, 17/12, 41/29, 99/70, 239/169, 577/408, 1393/985, 3363/2378, 8119/5741, 19601/13860, 47321/33461, 114243/80782, ... = A001333/A000129.
The 15 3 X 2 crossword grids, with white squares represented by an o:
  ooo ooo ooo ooo ooo ooo ooo oo. o.o .oo o.. .o. ..o oo. .oo
  ooo oo. o.o .oo o.. .o. ..o ooo ooo ooo ooo ooo ooo .oo oo.
G.f. = 1 + x + 3*x^2 + 7*x^3 + 17*x^4 + 41*x^5 + 99*x^6 + 239*x^7 + 577*x^8 + ...
		

References

  • M. R. Bacon and C. K. Cook, Some properties of Oresme numbers and convolutions ..., Fib. Q., 62:3 (2024), 233-240.
  • A. H. Beiler, Recreations in the Theory of Numbers. New York: Dover, pp. 122-125, 1964.
  • John H. Conway and Richard K. Guy, The Book of Numbers, New York: Springer-Verlag, 1996. See p. 204.
  • John Derbyshire, Prime Obsession, Joseph Henry Press, April 2004, see p. 16.
  • J. Devillet, J.-L. Marichal, and B. Teheux, Classifications of quasitrivial semigroups, Semigroup Forum, 100 (2020), 743-764.
  • Maribel Díaz Noguera [Maribel Del Carmen Díaz Noguera], Rigoberto Flores, Jose L. Ramirez, and Martha Romero Rojas, Catalan identities for generalized Fibonacci polynomials, Fib. Q., 62:2 (2024), 100-111.
  • Kenneth Edwards and Michael A. Allen, A new combinatorial interpretation of the Fibonacci numbers squared, Part II, Fib. Q., 58:2 (2020), 169-177.
  • R. P. Grimaldi, Ternary strings with no consecutive 0's and no consecutive 1's, Congressus Numerantium, 205 (2011), 129-149.
  • Jan Gullberg, Mathematics from the Birth of Numbers, W. W. Norton & Co., NY & London, 1997, §8.5 The Fibonacci and Related Sequences, p. 288.
  • A. F. Horadam, R. P. Loh, and A. G. Shannon, Divisibility properties of some Fibonacci-type sequences, pp. 55-64 of Combinatorial Mathematics VI (Armidale 1978), Lect. Notes Math. 748, 1979.
  • Thomas Koshy, Pell and Pell-Lucas Numbers with Applications, Springer, New York, 2014.
  • Kin Y. Li, Math Problem Book I, 2001, p. 24, Problem 159.
  • I. Niven and H. S. Zuckerman, An Introduction to the Theory of Numbers. 2nd ed., Wiley, NY, 1966, p. 102, Problem 10.
  • J. Roberts, Lure of the Integers, Math. Assoc. America, 1992, p. 224.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • R. P. Stanley, Enumerative Combinatorics, Volume 1 (1986), p. 203, Example 4.1.2.
  • A. Tarn, Approximations to certain square roots and the series of numbers connected therewith, Mathematical Questions and Solutions from the Educational Times, 1 (1916), 8-12.
  • R. C. Tilley et al., The cell growth problem for filaments, Proc. Louisiana Conf. Combinatorics, ed. R. C. Mullin et al., Baton Rouge, 1970, 310-339.
  • David Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986, Revised edition 1987, p. 34.

Crossrefs

For denominators see A000129.
See A040000 for the continued fraction expansion of sqrt(2).
See also A078057 which is the same sequence without the initial 1.
Cf. also A002203, A152113.
Row sums of unsigned Chebyshev T-triangle A053120. a(n)= A054458(n, 0) (first column of convolution triangle).
Row sums of A140750, A160756, A135837.
Equals A034182(n-1) + 2 and A084128(n)/2^n. First differences of A052937. Partial sums of A052542. Pairwise sums of A048624. Bisection of A002965.
The following sequences (and others) belong to the same family: A001333, A000129, A026150, A002605, A046717, A015518, A084057, A063727, A002533, A002532, A083098, A083099, A083100, A015519.
Second row of the array in A135597.
Cf. A055099.
Cf. A028859, A001906 / A088305, A033303, A000225, A095263, A003945, A006356, A002478, A214260, A001911 and A000217 for other restricted ternary words.
Cf. Triangle A106513 (alternating row sums).
Equals A293004 + 1.
Cf. A033539, A332602, A086395 (subseq. of primes).

Programs

  • Haskell
    a001333 n = a001333_list !! n
    a001333_list = 1 : 1 : zipWith (+)
                           a001333_list (map (* 2) $ tail a001333_list)
    -- Reinhard Zumkeller, Jul 08 2012
    
  • Magma
    [n le 2 select 1 else 2*Self(n-1)+Self(n-2): n in [1..35]]; // Vincenzo Librandi, Nov 10 2018
    
  • Maple
    A001333 := proc(n) option remember; if n=0 then 1 elif n=1 then 1 else 2*procname(n-1)+procname(n-2) fi end;
    Digits := 50; A001333 := n-> round((1/2)*(1+sqrt(2))^n);
    with(numtheory): cf := cfrac (sqrt(2),1000): [seq(nthnumer(cf,i), i=0..50)];
    a:= n-> (M-> M[2, 1]+M[2, 2])(<<2|1>, <1|0>>^n):
    seq(a(n), n=0..33);  # Alois P. Heinz, Aug 01 2008
    A001333List := proc(m) local A, P, n; A := [1,1]; P := [1,1];
    for n from 1 to m - 2 do P := ListTools:-PartialSums([op(A), P[-2]]);
    A := [op(A), P[-1]] od; A end: A001333List(32); # Peter Luschny, Mar 26 2022
  • Mathematica
    Insert[Table[Numerator[FromContinuedFraction[ContinuedFraction[Sqrt[2], n]]], {n, 1, 40}], 1, 1] (* Stefan Steinerberger, Apr 08 2006 *)
    Table[((1 - Sqrt[2])^n + (1 + Sqrt[2])^n)/2, {n, 0, 29}] // Simplify (* Robert G. Wilson v, May 02 2006 *)
    a[0] = 1; a[1] = 1; a[n_] := a[n] = 2a[n - 1] + a[n - 2]; Table[a@n, {n, 0, 29}] (* Robert G. Wilson v, May 02 2006 *)
    Table[ MatrixPower[{{1, 2}, {1, 1}}, n][[1, 1]], {n, 0, 30}] (* Robert G. Wilson v, May 02 2006 *)
    a=c=0;t={b=1}; Do[c=a+b+c; AppendTo[t,c]; a=b;b=c,{n,40}]; t (* Vladimir Joseph Stephan Orlovsky, Mar 23 2009 *)
    LinearRecurrence[{2, 1}, {1, 1}, 40] (* Vladimir Joseph Stephan Orlovsky, Mar 23 2009 *)
    Join[{1}, Numerator[Convergents[Sqrt[2], 30]]] (* Harvey P. Dale, Aug 22 2011 *)
    Table[(-I)^n ChebyshevT[n, I], {n, 10}] (* Eric W. Weisstein, Apr 04 2017 *)
    CoefficientList[Series[(-1 + x)/(-1 + 2 x + x^2), {x, 0, 20}], x] (* Eric W. Weisstein, Sep 21 2017 *)
    Table[Sqrt[(ChebyshevT[n, 3] + (-1)^n)/2], {n, 0, 20}] (* Eric W. Weisstein, Apr 17 2018 *)
  • PARI
    {a(n) = if( n<0, (-1)^n, 1) * contfracpnqn( vector( abs(n), i, 1 + (i>1))) [1, 1]}; /* Michael Somos, Sep 02 2012 */
    
  • PARI
    {a(n) = polchebyshev(n, 1, I) / I^n}; /* Michael Somos, Sep 02 2012 */
    
  • PARI
    a(n) = real((1 + quadgen(8))^n); \\ Michel Marcus, Mar 16 2021
    
  • PARI
    { for (n=0, 4000, a=contfracpnqn(vector(n, i, 1+(i>1)))[1, 1]; if (a > 10^(10^3 - 6), break); write("b001333.txt", n, " ", a); ); } \\ Harry J. Smith, Jun 12 2009
    
  • Python
    from functools import cache
    @cache
    def a(n): return 1 if n < 2 else 2*a(n-1) + a(n-2)
    print([a(n) for n in range(32)]) # Michael S. Branicky, Nov 13 2022
  • Sage
    from sage.combinat.sloane_functions import recur_gen2
    it = recur_gen2(1,1,2,1)
    [next(it) for i in range(30)] ## Zerinvary Lajos, Jun 24 2008
    
  • Sage
    [lucas_number2(n,2,-1)/2 for n in range(0, 30)] # Zerinvary Lajos, Apr 30 2009
    

Formula

a(n) = A055642(A125058(n)). - Reinhard Zumkeller, Feb 02 2007
a(n) = 2a(n-1) + a(n-2);
a(n) = ((1-sqrt(2))^n + (1+sqrt(2))^n)/2.
a(n)+a(n+1) = 2 A000129(n+1). 2*a(n) = A002203(n).
G.f.: (1 - x) / (1 - 2*x - x^2) = 1 / (1 - x / (1 - 2*x / (1 + x))). - Simon Plouffe in his 1992 dissertation.
A000129(2n) = 2*A000129(n)*a(n). - John McNamara, Oct 30 2002
a(n) = (-i)^n * T(n, i), with T(n, x) Chebyshev's polynomials of the first kind A053120 and i^2 = -1.
a(n) = a(n-1) + A052542(n-1), n>1. a(n)/A052542(n) converges to sqrt(1/2). - Mario Catalani (mario.catalani(AT)unito.it), Apr 29 2003
E.g.f.: exp(x)cosh(x*sqrt(2)). - Paul Barry, May 08 2003
a(n) = Sum_{k=0..floor(n/2)} binomial(n, 2k)2^k. - Paul Barry, May 13 2003
For n > 0, a(n)^2 - (1 + (-1)^(n))/2 = Sum_{k=0..n-1} ((2k+1)*A001653(n-1-k)); e.g., 17^2 - 1 = 288 = 1*169 + 3*29 + 5*5 + 7*1; 7^2 = 49 = 1*29 + 3*5 + 5*1. - Charlie Marion, Jul 18 2003
a(n+2) = A078343(n+1) + A048654(n). - Creighton Dement, Jan 19 2005
a(n) = A000129(n) + A000129(n-1) = A001109(n)/A000129(n) = sqrt(A001110(n)/A000129(n)^2) = ceiling(sqrt(A001108(n))). - Henry Bottomley, Apr 18 2000
Also the first differences of A000129 (the Pell numbers) because A052937(n) = A000129(n+1) + 1. - Graeme McRae, Aug 03 2006
a(n) = Sum_{k=0..n} A122542(n,k). - Philippe Deléham, Oct 08 2006
For another recurrence see A000129.
a(n) = Sum_{k=0..n} A098158(n,k)*2^(n-k). - Philippe Deléham, Dec 26 2007
a(n) = upper left and lower right terms of [1,1; 2,1]^n. - Gary W. Adamson, Mar 12 2008
If p[1]=1, and p[i]=2, (i>1), and if A is Hessenberg matrix of order n defined by: A[i,j]=p[j-i+1], (i<=j), A[i,j]=-1, (i=j+1), and A[i,j]=0 otherwise. Then, for n>=1, a(n)=det A. - Milan Janjic, Apr 29 2010
For n>=2, a(n)=F_n(2)+F_(n+1)(2), where F_n(x) is Fibonacci polynomial (cf. A049310): F_n(x) = Sum_{i=0..floor((n-1)/2)} binomial(n-i-1,i)x^(n-2*i-1). - Vladimir Shevelev, Apr 13 2012
a(-n) = (-1)^n * a(n). - Michael Somos, Sep 02 2012
Dirichlet g.f.: (PolyLog(s,1-sqrt(2)) + PolyLog(s,1+sqrt(2)))/2. - Ilya Gutkovskiy, Jun 26 2016
a(n) = A000129(n) - A000129(n-1), where A000129(n) is the n-th Pell Number. Hence the continued fraction is of the form 1-(A000129(n-1)/A000129(n)). - Gregory L. Simay, Nov 09 2018
a(n) = (A000129(n+3) + A000129(n-3))/10, n>=3. - Paul Curtz, Jun 16 2021
a(n) = (A000129(n+6) - A000129(n-6))/140, n>=6. - Paul Curtz, Jun 20 2021
a(n) = round((1/2)*sqrt(Product_{k=1..n} 4*(1 + sin(k*Pi/n)^2))), for n>=1. - Greg Dresden, Dec 28 2021
a(n)^2 + a(n+1)^2 = A075870(n+1) = 2*(b(n)^2 + b(n+1)^2) for all n in Z where b(n) := A000129(n). - Michael Somos, Apr 02 2022
a(n) = 2*A048739(n-2)+1. - R. J. Mathar, Feb 01 2024
Sum_{n>=1} 1/a(n) = 1.5766479516393275911191017828913332473... - R. J. Mathar, Feb 05 2024
From Peter Bala, Jul 06 2025: (Start)
G.f.: Sum_{n >= 1} (-1)^(n+1) * x^(n-1) * Product_{k = 1..n} (1 - k*x)/(1 - 3*x + k*x^2).
The following series telescope:
Sum_{n >= 1} (-1)^(n+1)/(a(2*n) + 1/a(2*n)) = 1/4, since 1/(a(2*n) + 1/a(2*n)) = 1/A077445(n) + 1/A077445(n+1).
Sum_{n >= 1} (-1)^(n+1)/(a(2*n+1) - 1/a(2*n+1)) = 1/8, since. 1/(a(2*n+1) - 1/a(2*n+1)) = 1/(4*Pell(2*n)) + 1/(4*Pell(2*n+2)), where Pell(n) = A000129(n).
Sum_{n >= 1} (-1)^(n+1)/(a(2*n+1) + 9/a(2*n+1)) = 1/10, since 1/(a(2*n+1) + 9/a(2*n+1)) = b(n) + b(n+1), where b(n) = A001109(n)/(2*Pell(2*n-1)*Pell(2*n+1)).
Sum_{n >= 1} (-1)^(n+1)/(a(n)*a(n+1)) = 1 - sqrt(2)/2 = A268682, since (-1)^(n+1)/(a(n)*a(n+1)) = Pell(n)/a(n) - Pell(n+1)/a(n+1). (End)

Extensions

Chebyshev comments from Wolfdieter Lang, Jan 10 2003

A002315 NSW numbers: a(n) = 6*a(n-1) - a(n-2); also a(n)^2 - 2*b(n)^2 = -1 with b(n) = A001653(n+1).

Original entry on oeis.org

1, 7, 41, 239, 1393, 8119, 47321, 275807, 1607521, 9369319, 54608393, 318281039, 1855077841, 10812186007, 63018038201, 367296043199, 2140758220993, 12477253282759, 72722761475561, 423859315570607, 2470433131948081, 14398739476117879, 83922003724759193
Offset: 0

Views

Author

Keywords

Comments

Named after the Newman-Shanks-Williams reference.
Also numbers k such that A125650(3*k^2) is an odd perfect square. Such numbers 3*k^2 form a bisection of A125651. - Alexander Adamchuk, Nov 30 2006
For positive n, a(n) corresponds to the sum of legs of near-isosceles primitive Pythagorean triangles (with consecutive legs). - Lekraj Beedassy, Feb 06 2007
Also numbers m such that m^2 is a centered 16-gonal number; or a number of the form 8k(k+1)+1, where k = A053141(m) = {0, 2, 14, 84, 492, 2870, ...}. - Alexander Adamchuk, Apr 21 2007
The lower principal convergents to 2^(1/2), beginning with 1/1, 7/5, 41/29, 239/169, comprise a strictly increasing sequence; numerators=A002315 and denominators=A001653. - Clark Kimberling, Aug 27 2008
The upper intermediate convergents to 2^(1/2) beginning with 10/7, 58/41, 338/239, 1970/1393 form a strictly decreasing sequence; essentially, numerators=A075870, denominators=A002315. - Clark Kimberling, Aug 27 2008
General recurrence is a(n) = (a(1)-1)*a(n-1) - a(n-2), a(1) >= 4, lim_{n->oo} a(n) = x*(k*x+1)^n, k = (a(1)-3), x = (1+sqrt((a(1)+1)/(a(1)-3)))/2. Examples in OEIS: a(1)=4 gives A002878. a(1)=5 gives A001834. a(1)=6 gives A030221. a(1)=7 gives A002315. a(1)=8 gives A033890. a(1)=9 gives A057080. a(1)=10 gives A057081. - Ctibor O. Zizka, Sep 02 2008
Numbers k such that (ceiling(sqrt(k*k/2)))^2 = (1+k*k)/2. - Ctibor O. Zizka, Nov 09 2009
A001109(n)/a(n) converges to cos^2(Pi/8) = 1/2 + 2^(1/2)/4. - Gary Detlefs, Nov 25 2009
The values 2(a(n)^2+1) are all perfect squares, whose square root is given by A075870. - Neelesh Bodas (neelesh.bodas(AT)gmail.com), Aug 13 2010
a(n) represents all positive integers K for which 2(K^2+1) is a perfect square. - Neelesh Bodas (neelesh.bodas(AT)gmail.com), Aug 13 2010
For positive n, a(n) equals the permanent of the (2n) X (2n) tridiagonal matrix with sqrt(8)'s along the main diagonal, and i's along the superdiagonal and subdiagonal (i is the imaginary unit). - John M. Campbell, Jul 08 2011
Integers k such that A000217(k-2) + A000217(k-1) + A000217(k) + A000217(k+1) is a square (cf. A202391). - Max Alekseyev, Dec 19 2011
Integer square roots of floor(k^2/2 - 1) or A047838. - Richard R. Forberg, Aug 01 2013
Remark: x^2 - 2*y^2 = +2*k^2, with positive k, and X^2 - 2*Y^2 = +2 reduce to the present Pell equation a^2 - 2*b^2 = -1 with x = k*X = 2*k*b and y = k*Y = k*a. (After a proposed solution for k = 3 by Alexander Samokrutov.) - Wolfdieter Lang, Aug 21 2015
If p is an odd prime, a((p-1)/2) == 1 (mod p). - Altug Alkan, Mar 17 2016
a(n)^2 + 1 = 2*b(n)^2, with b(n) = A001653(n), is the necessary and sufficient condition for a(n) to be a number k for which the diagonal of a 1 X k rectangle is an integer multiple of the diagonal of a 1 X 1 square. If squares are laid out thus along one diagonal of a horizontal 1 X a(n) rectangle, from the lower left corner to the upper right, the number of squares is b(n), and there will always be a square whose top corner lies exactly within the top edge of the rectangle. Numbering the squares 1 to b(n) from left to right, the number of the one square that has a corner in the top edge of the rectangle is c(n) = (2*b(n) - a(n) + 1)/2, which is A055997(n). The horizontal component of the corner of the square in the edge of the rectangle is also an integer, namely d(n) = a(n) - b(n), which is A001542(n). - David Pasino, Jun 30 2016
(a(n)^2)-th triangular number is a square; a(n)^2 = A008843(n) is a subsequence of A001108. - Jaroslav Krizek, Aug 05 2016
a(n-1)/A001653(n) is the closest rational approximation of sqrt(2) with a numerator not larger than a(n-1). These rational approximations together with those obtained from the sequences A001541 and A001542 give a complete set of closest rational approximations of sqrt(2) with restricted numerator or denominator. a(n-1)/A001653(n) < sqrt(2). - A.H.M. Smeets, May 28 2017
Consider the quadrant of a circle with center (0,0) bounded by the positive x and y axes. Now consider, as the start of a series, the circle contained within this quadrant which kisses both axes and the outer bounding circle. Consider further a succession of circles, each kissing the x-axis, the outer bounding circle, and the previous circle in the series. See Holmes link. The center of the n-th circle in this series is ((A001653(n)*sqrt(2)-1)/a(n-1), (A001653(n)*sqrt(2)-1)/a(n-1)^2), the y-coordinate also being its radius. It follows that a(n-1) is the cotangent of the angle subtended at point (0,0) by the center of the n-th circle in the series with respect to the x-axis. - Graham Holmes, Aug 31 2019
There is a link between the two sequences present at the numerator and at the denominator of the fractions that give the coordinates of the center of the kissing circles. A001653 is the sequence of numbers k such that 2*k^2 - 1 is a square, and here, we have 2*A001653(n)^2 - 1 = a(n-1)^2. - Bernard Schott, Sep 02 2019
Let G be a sequence satisfying G(i) = 2*G(i-1) + G(i-2) for arbitrary integers i and without regard to the initial values of G. Then a(n) = (G(i+4*n+2) - G(i))/(2*G(i+2*n+1)) as long as G(i+2*n+1) != 0. - Klaus Purath, Mar 25 2021
All of the positive integer solutions of a*b+1=x^2, a*c+1=y^2, b*c+1=z^2, x+z=2*y, 0 < a < b < c are given by a=A001542(n), b=A005319(n), c=A001542(n+1), x=A001541(n), y=A001653(n+1), z=A002315(n) with 0 < n. - Michael Somos, Jun 26 2022
3*a(n-1) is the n-th almost Lucas-cobalancing number of second type (see Tekcan and Erdem). - Stefano Spezia, Nov 26 2022
In Moret-Blanc (1881) on page 259 some solution of m^2 - 2n^2 = -1 are listed. The values of m give this sequence, and the values of n give A001653. - Michael Somos, Oct 25 2023
From Klaus Purath, May 11 2024: (Start)
For any two consecutive terms (a(n), a(n+1)) = (x,y): x^2 - 6xy + y^2 = 8 = A028884(1). In general, the following applies to all sequences (t) satisfying t(i) = 6t(i-1) - t(i-2) with t(0) = 1 and two consecutive terms (x,y): x^2 - 6xy + y^2 = A028884(t(1)-6). This includes and interprets the Feb 04 2014 comment on A001541 by Colin Barker as well as the Mar 17 2021 comment on A054489 by John O. Oladokun and the Sep 28 2008 formula on A038723 by Michael Somos. By analogy to this, for three consecutive terms (x,y,z) y^2 - xz = A028884(t(1)-6) always applies.
If (t) is a sequence satisfying t(k) = 7t(k-1) - 7t(k-2) + t(k-3) or t(k) = 6t(k-1) - t(k-2) without regard to initial values and including this sequence itself, then a(n) = (t(k+2n+1) - t(k))/(t(k+n+1) - t(k+n)) always applies, as long as t(k+n+1) - t(k+n) != 0 for integer k and n >= 0. (End)

Examples

			G.f. = 1 + 7*x + 41*x^2 + 239*x^3 + 1393*x^4 + 8119*x^5 + 17321*x^6 + ... - _Michael Somos_, Jun 26 2022
		

References

  • Julio R. Bastida, Quadratic properties of a linearly recurrent sequence. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 163-166, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561042 (81e:10009)
  • A. H. Beiler, Recreations in the Theory of Numbers, Dover, NY, 1964, p. 256.
  • Paulo Ribenboim, The Book of Prime Number Records. Springer-Verlag, NY, 2nd ed., 1989, p. 288.
  • Paulo Ribenboim, The Little Book of Bigger Primes, Springer-Verlag NY 2004. See p. 247.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • P.-F. Teilhet, Reply to Query 2094, L'Intermédiaire des Mathématiciens, 10 (1903), 235-238.
  • P.-F. Teilhet, Query 2376, L'Intermédiaire des Mathématiciens, 11 (1904), 138-139. - N. J. A. Sloane, Mar 08 2022

Crossrefs

Bisection of A001333. Cf. A001109, A001653. A065513(n)=a(n)-1.
First differences of A001108 and A055997. Bisection of A084068 and A088014. Cf. A077444.
Row sums of unsigned triangle A127675.
Cf. A053141, A075870. Cf. A000045, A002878, A004146, A026003, A100047, A119915, A192425, A088165 (prime subsequence), A057084 (binomial transform), A108051 (inverse binomial transform).
See comments in A301383.
Cf. similar sequences of the type (1/k)*sinh((2*n+1)*arcsinh(k)) listed in A097775.

Programs

  • Haskell
    a002315 n = a002315_list !! n
    a002315_list = 1 : 7 : zipWith (-) (map (* 6) (tail a002315_list)) a002315_list
    -- Reinhard Zumkeller, Jan 10 2012
    
  • Magma
    I:=[1,7]; [n le 2 select I[n] else 6*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Mar 22 2015
  • Maple
    A002315 := proc(n)
        option remember;
        if n = 0 then
            1 ;
        elif n = 1 then
            7;
        else
            6*procname(n-1)-procname(n-2) ;
        end if;
    end proc: # Zerinvary Lajos, Jul 26 2006, modified R. J. Mathar, Apr 30 2017
    a:=n->abs(Im(simplify(ChebyshevT(2*n+1,I)))):seq(a(n),n=0..20); # Leonid Bedratyuk, Dec 17 2017
    # third Maple program:
    a:= n-> (<<0|1>, <-1|6>>^n. <<1, 7>>)[1, 1]:
    seq(a(n), n=0..22);  # Alois P. Heinz, Aug 25 2024
  • Mathematica
    a[0] = 1; a[1] = 7; a[n_] := a[n] = 6a[n - 1] - a[n - 2]; Table[ a[n], {n, 0, 20}] (* Robert G. Wilson v, Jun 09 2004 *)
    Transpose[NestList[Flatten[{Rest[#],ListCorrelate[{-1,6},#]}]&, {1,7},20]][[1]]  (* Harvey P. Dale, Mar 23 2011 *)
    Table[ If[n>0, a=b; b=c; c=6b-a, b=-1; c=1], {n, 0, 20}] (* Jean-François Alcover, Oct 19 2012 *)
    LinearRecurrence[{6, -1}, {1, 7}, 20] (* Bruno Berselli, Apr 03 2018 *)
    a[ n_] := -I*(-1)^n*ChebyshevT[2*n + 1, I]; (* Michael Somos, Jun 26 2022 *)
  • PARI
    {a(n) = subst(poltchebi(abs(n+1)) - poltchebi(abs(n)), x, 3)/2};
    
  • PARI
    {a(n) = if(n<0, -a(-1-n), polsym(x^2-2*x-1, 2*n+1)[2*n+2]/2)};
    
  • PARI
    {a(n) = my(w=3+quadgen(32)); imag((1+w)*w^n)};
    
  • PARI
    for (i=1,10000,if(Mod(sigma(i^2+1,2),2)==1,print1(i,",")))
    
  • PARI
    {a(n) = -I*(-1)^n*polchebyshev(2*n+1, 1, I)}; /* Michael Somos, Jun 26 2022 */
    

Formula

a(n) = (1/2)*((1+sqrt(2))^(2*n+1) + (1-sqrt(2))^(2*n+1)).
a(n) = A001109(n)+A001109(n+1).
a(n) = (1+sqrt(2))/2*(3+sqrt(8))^n+(1-sqrt(2))/2*(3-sqrt(8))^n. - Ralf Stephan, Feb 23 2003
a(n) = sqrt(2*(A001653(n+1))^2-1), n >= 0. [Pell equation a(n)^2 - 2*Pell(2*n+1)^2 = -1. - Wolfdieter Lang, Jul 11 2018]
G.f.: (1 + x)/(1 - 6*x + x^2). - Simon Plouffe in his 1992 dissertation
a(n) = S(n, 6)+S(n-1, 6) = S(2*n, sqrt(8)), S(n, x) = U(n, x/2) are Chebyshev's polynomials of the 2nd kind. Cf. A049310. S(n, 6)= A001109(n+1).
a(n) ~ (1/2)*(sqrt(2) + 1)^(2*n+1). - Joe Keane (jgk(AT)jgk.org), May 15 2002
Limit_{n->oo} a(n)/a(n-1) = 3 + 2*sqrt(2). - Gregory V. Richardson, Oct 06 2002
Let q(n, x) = Sum_{i=0..n} x^(n-i)*binomial(2*n-i, i); then (-1)^n*q(n, -8) = a(n). - Benoit Cloitre, Nov 10 2002
With a=3+2*sqrt(2), b=3-2*sqrt(2): a(n) = (a^((2n+1)/2)-b^((2n+1)/2))/2. a(n) = A077444(n)/2. - Mario Catalani (mario.catalani(AT)unito.it), Mar 31 2003
a(n) = Sum_{k=0..n} 2^k*binomial(2*n+1, 2*k). - Zoltan Zachar (zachar(AT)fellner.sulinet.hu), Oct 08 2003
Same as: i such that sigma(i^2+1, 2) mod 2 = 1. - Mohammed Bouayoun (bouyao(AT)wanadoo.fr), Mar 26 2004
a(n) = L(n, -6)*(-1)^n, where L is defined as in A108299; see also A001653 for L(n, +6). - Reinhard Zumkeller, Jun 01 2005
a(n) = A001652(n)+A046090(n); e.g., 239=119+120. - Charlie Marion, Nov 20 2003
A001541(n)*a(n+k) = A001652(2n+k) + A001652(k)+1; e.g., 3*1393 = 4069 + 119 + 1; for k > 0, A001541(n+k)*a(n) = A001652(2n+k) - A001652(k-1); e.g., 99*7 = 696 - 3. - Charlie Marion, Mar 17 2003
a(n) = Jacobi_P(n,1/2,-1/2,3)/Jacobi_P(n,-1/2,1/2,1). - Paul Barry, Feb 03 2006
P_{2n}+P_{2n+1} where P_i are the Pell numbers (A000129). Also the square root of the partial sums of Pell numbers: P_{2n}+P_{2n+1} = sqrt(Sum_{i=0..4n+1} P_i) (Santana and Diaz-Barrero, 2006). - David Eppstein, Jan 28 2007
a(n) = 2*A001652(n) + 1 = 2*A046729(n) + (-1)^n. - Lekraj Beedassy, Feb 06 2007
a(n) = sqrt(A001108(2*n+1)). - Anton Vrba (antonvrba(AT)yahoo.com), Feb 14 2007
a(n) = sqrt(8*A053141(n)*(A053141(n) + 1) + 1). - Alexander Adamchuk, Apr 21 2007
a(n+1) = 3*a(n) + sqrt(8*a(n)^2 + 8), a(1)=1. - Richard Choulet, Sep 18 2007
a(n) = A001333(2*n+1). - Ctibor O. Zizka, Aug 13 2008
a(n) = third binomial transform of 1, 4, 8, 32, 64, 256, 512, ... . - Al Hakanson (hawkuu(AT)gmail.com), Aug 15 2009
a(n) = (-1)^(n-1)*(1/sqrt(-1))*cos((2*n - 1)*arcsin(sqrt(2)). - Artur Jasinski, Feb 17 2010 *WRONG*
a(n+k) = A001541(k)*a(n) + 4*A001109(k)*A001653(n); e.g., 8119 = 17*239 + 4*6*169. - Charlie Marion, Feb 04 2011
In general, a(n+k) = A001541(k)*a(n)) + sqrt(A001108(2k)*(a(n)^2+1)). See Sep 18 2007 entry above. - Charlie Marion, Dec 07 2011
a(n) = floor((1+sqrt(2))^(2n+1))/2. - Thomas Ordowski, Jun 12 2012
(a(2n-1) + a(2n) + 8)/(8*a(n)) = A001653(n). - Ignacio Larrosa Cañestro, Jan 02 2015
(a(2n) + a(2n-1))/a(n) = 2*sqrt(2)*( (1 + sqrt(2))^(4*n) - (1 - sqrt(2))^(4*n))/((1 + sqrt(2))^(2*n+1) + (1 - sqrt(2))^(2*n+1)). [This was my solution to problem 5325, School Science and Mathematics 114 (No. 8, Dec 2014).] - Henry Ricardo, Feb 05 2015
From Peter Bala, Mar 22 2015: (Start)
The aerated sequence (b(n))n>=1 = [1, 0, 7, 0, 41, 0, 239, 0, ...] is a fourth-order linear divisibility sequence; that is, if n | m then b(n) | b(m). It is the case P1 = 0, P2 = -4, Q = -1 of the 3-parameter family of divisibility sequences found by Williams and Guy. See A100047.
b(n) = 1/2*((-1)^n - 1)*Pell(n) + 1/2*(1 + (-1)^(n+1))*Pell(n+1). The o.g.f. is x*(1 + x^2)/(1 - 6*x^2 + x^4).
Exp( Sum_{n >= 1} 2*b(n)*x^n/n ) = 1 + Sum_{n >= 1} 2*A026003(n-1)*x^n.
Exp( Sum_{n >= 1} (-2)*b(n)*x^n/n ) = 1 + Sum_{n >= 1} 2*A026003(n-1)*(-x)^n.
Exp( Sum_{n >= 1} 4*b(n)*x^n/n ) = 1 + Sum_{n >= 1} 4*Pell(n)*x^n.
Exp( Sum_{n >= 1} (-4)*b(n)*x^n/n ) = 1 + Sum_{n >= 1} 4*Pell(n)*(-x)^n.
Exp( Sum_{n >= 1} 8*b(n)*x^n/n ) = 1 + Sum_{n >= 1} 8*A119915(n)*x^n.
Exp( Sum_{n >= 1} (-8)*b(n)*x^n/n ) = 1 + Sum_{n >= 1} 8*A119915(n)*(-x)^n. Cf. A002878, A004146, A113224, and A192425. (End)
E.g.f.: (sqrt(2)*sinh(2*sqrt(2)*x) + cosh(2*sqrt(2)*x))*exp(3*x). - Ilya Gutkovskiy, Jun 30 2016
a(n) = Sum_{k=0..n} binomial(n,k) * 3^(n-k) * 2^k * 2^ceiling(k/2). - David Pasino, Jul 09 2016
a(n) = A001541(n) + 2*A001542(n). - A.H.M. Smeets, May 28 2017
a(n+1) = 3*a(n) + 4*b(n), b(n+1) = 2*a(n) + 3*b(n), with b(n)=A001653(n). - Zak Seidov, Jul 13 2017
a(n) = |Im(T(2n-1,i))|, i=sqrt(-1), T(n,x) is the Chebyshev polynomial of the first kind, Im is the imaginary part of a complex number, || is the absolute value. - Leonid Bedratyuk, Dec 17 2017
a(n) = sinh((2*n + 1)*arcsinh(1)). - Bruno Berselli, Apr 03 2018
a(n) = 5*a(n-1) + A003499(n-1), a(0) = 1. - Ivan N. Ianakiev, Aug 09 2019
From Klaus Purath, Mar 25 2021: (Start)
a(n) = A046090(2*n)/A001541(n).
a(n+1)*a(n+2) = a(n)*a(n+3) + 48.
a(n)^2 + a(n+1)^2 = 6*a(n)*a(n+1) + 8.
a(n+1)^2 = a(n)*a(n+2) + 8.
a(n+1) = a(n) + 2*A001541(n+1).
a(n) = 2*A046090(n) - 1. (End)
3*a(n-1) = sqrt(8*b(n)^2 + 8*b(n) - 7), where b(n) = A358682(n). - Stefano Spezia, Nov 26 2022
a(n) = -(-1)^n - 2 + Sum_{i=0..n} A002203(i)^2. - Adam Mohamed, Aug 22 2024
From Peter Bala, May 09 2025: (Start)
a(n) = Dir(n, 3), where Dir(n, x) denotes the n-th row polynomial of the triangle A244419.
For arbitrary x, a(n+x)^2 - 6*a(n+x)*a(n+x+1) + a(n+x+1)^2 = 8 with a(n) := (1/2)*((1+sqrt(2))^(2*n+1) + (1-sqrt(2))^(2*n+1)) as above. The particular case x = 0 is noted above,
a(n+1/2) = sqrt(2) * A001542(n+1).
Sum_{n >= 1} (-1)^(n+1)/(a(n) - 1/a(n)) = 1/8 (telescoping series: for n >= 1, 1/(a(n) - 1/a(n)) = 1/A081554(n) + 1/A081554(n+1)).
Product_{n >= 1} (a(n) + 1)/(a(n) - 1) = sqrt(2) (telescoping product: Product_{n = 1..k} ((a(n) + 1)/(a(n) - 1))^2 = 2*(1 - 1/A055997(k+2))). (End)

A001834 a(0) = 1, a(1) = 5, a(n) = 4*a(n-1) - a(n-2).

Original entry on oeis.org

1, 5, 19, 71, 265, 989, 3691, 13775, 51409, 191861, 716035, 2672279, 9973081, 37220045, 138907099, 518408351, 1934726305, 7220496869, 26947261171, 100568547815, 375326930089, 1400739172541, 5227629760075, 19509779867759, 72811489710961, 271736178976085
Offset: 0

Views

Author

Keywords

Comments

Sequence also gives values of x satisfying 3*y^2 - x^2 = 2, the corresponding y being given by A001835(n+1). Moreover, quadruples(p, q, r, s) satisfying p^2 + q^2 + r^2 = s^2, where p = q and r is either p+1 or p-1, are termed nearly isosceles Pythagorean and are given by p = {x + (-1)^n}/3, r = p-(-1)^n, s = y for n > 1. - Lekraj Beedassy, Jul 19 2002
a(n)= A002531(1+2*n). - Anton Vrba (antonvrba(AT)yahoo.com), Feb 14 2007
361 written in base A001835(n+1) - 1 is the square of a(n). E.g., a(12) = 2672279, A001835(13) - 1 = 1542840. We have 361_(1542840) = 3*1542840 + 6*1542840 + 1 = 2672279^2. - Richard Choulet, Oct 04 2007
The lower principal convergents to 3^(1/2), beginning with 1/1, 5/3, 19/11, 71/41, comprise a strictly increasing sequence; numerators=A001834, denominators=A001835. - Clark Kimberling, Aug 27 2008
General recurrence is a(n) = (a(1) - 1)*a(n-1) - a(n-2), a(1) >= 4, lim_{n->infinity} a(n) = x*(k*x + 1)^n, k = (a(1) - 3), x = (1 + sqrt((a(1) + 1)/(a(1) - 3)))/2. Examples in OEIS: a(1) = 4 gives A002878, primes in it A121534. a(1) = 5 gives A001834, primes in it A086386. a(1) = 6 gives A030221, primes in it A299109. a(1) = 7 gives A002315, primes in it A088165. a(1) = 8 gives A033890, primes in it not in OEIS (do there exist any?). a(1) = 9 gives A057080, primes in {71, 34649, 16908641, ...}. a(1) = 10 gives A057081, primes in it {389806471, 192097408520951, ...}. - Ctibor O. Zizka, Sep 02 2008
Inverse binomial transform of A030192. - Philippe Deléham, Nov 19 2009
For positive n, a(n) equals the permanent of the (2*n) X (2*n) tridiagonal matrix with sqrt(6)'s along the main diagonal, and i's along the superdiagonal and the subdiagonal (i is the imaginary unit). - John M. Campbell, Jul 08 2011
x-values in the solution to 3x^2 + 6 = y^2 (see A082841 for the y-values). - Sture Sjöstedt, Nov 25 2011
Pisano period lengths: 1, 1, 2, 4, 3, 2, 8, 4, 6, 3, 10, 4, 12, 8, 6, 8, 18, 6, 5, 12, ... - R. J. Mathar, Aug 10 2012
The aerated sequence (b(n))A100047%20for%20a%20connection%20with%20Chebyshev%20polynomials.%20-%20_Peter%20Bala">{n>=1} = [1, 0, 5, 0, 19, 0, 71, 0, ...] is a fourth-order linear divisibility sequence; that is, if n | m then b(n) | b(m). It is the case P1 = 0, P2 = -2, Q = -1 of the 3-parameter family of divisibility sequences found by Williams and Guy. See A100047 for a connection with Chebyshev polynomials. - _Peter Bala, Mar 22 2015
Yong Hao Ng has shown that for any n, a(n) is coprime with any member of A001835 and with any member of A001075. - René Gy, Feb 26 2018
From Wolfdieter Lang, Oct 15 2020: (Start)
((-1)^n)*a(n) = X(n) = (-1)^n*(S(n, 4) + S(n-1, 4)) and Y(n) = X(n-1) gives all integer solutions (modulo sign flip between X and Y) of X^2 + Y^2 + 4*X*Y = +6, for n = -oo..+oo, with Chebyshev S polynomials (see A049310), with S(-1, x) = 0, and S(-|n|, x) = - S(|n|-2, x), for |n| >= 2.
This binary indefinite quadratic form of discriminant 12, representing 6, has only this family of proper solutions (modulo sign flip), and no improper ones.
This comment is inspired by a paper by Robert K. Moniot (private communication). See his Oct 04 2020 comment in A027941 related to the case of x^2 + y^2 - 3*x*y = -1 (special Markov solutions). (End)
Floretion Algebra Multiplication Program, FAMP Code: A001834 = (4/3)vesseq[ - .25'i + 1.25'j - .25'k - .25i' + 1.25j' - .25k' + 1.25'ii' + .25'jj' - .75'kk' + .75'ij' + .25'ik' + .75'ji' - .25'jk' + .25'ki' - .25'kj' + .25e], apart from initial term

Examples

			G.f. = 1 + 5*x + 19*x^2 + 71*x^3 + 265*x^4 + 989*x^5 + 3691*x^6 + ...
		

References

  • Bastida, Julio R. Quadratic properties of a linearly recurrent sequence. Proceedings of the Tenth Southeastern Conference on Combinatorics, Graph Theory and Computing (Florida Atlantic Univ., Boca Raton, Fla., 1979), pp. 163--166, Congress. Numer., XXIII-XXIV, Utilitas Math., Winnipeg, Man., 1979. MR0561042 (81e:10009)
  • Leonhard Euler, (E388) Vollstaendige Anleitung zur Algebra, Zweiter Theil, reprinted in: Opera Omnia. Teubner, Leipzig, 1911, Series (1), Vol. 1, p. 375.
  • Serge Lang, Introduction to Diophantine Approximations, Addison-Wesley, New York, 1966.
  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • P.-F. Teilhet, Reply to Query 2094, L'Intermédiaire des Mathématiciens, 10 (1903), 235-238.

Crossrefs

A bisection of sequence A002531.
Cf. A001352, A001835, A086386 (prime members).
Cf. A026150.
a(n)^2+1 = A094347(n+1).

Programs

  • Haskell
    a001834 n = a001834_list !! (n-1)
    a001834_list = 1 : 5 : zipWith (-) (map (* 4) $ tail a001834_list) a001834_list
    -- Reinhard Zumkeller, Jan 23 2012
    
  • Magma
    I:=[1,5]; [n le 2 select I[n] else 4*Self(n-1)-Self(n-2): n in [1..30]]; // Vincenzo Librandi, Mar 22 2015
  • Maple
    f:=n->((1+sqrt(3))^(2*n+1)+(1-sqrt(3))^(2*n+1))/2^(n+1); # N. J. A. Sloane, Nov 10 2009
  • Mathematica
    a[0] = 1; a[1] = 5; a[n_] := a[n] = 4a[n - 1] - a[n - 2]; Table[ a[n], {n, 0, 25}] (* Robert G. Wilson v, Apr 24 2004 *)
    Table[Expand[((1+Sqrt[3])^(2*n+1)+(1+Sqrt[3])^(2*n+1))/2^(n+1)],{n, 0, 20}] (* Anton Vrba, Feb 14 2007 *)
    LinearRecurrence[{4, -1}, {1, 5}, 50] (* Sture Sjöstedt, Nov 27 2011 *)
    a[c_, n_] := Module[{},
       p := Length[ContinuedFraction[ Sqrt[ c]][[2]]];
       d := Numerator[Convergents[Sqrt[c], n p]];
       t := Table[d[[1 + i]], {i, 0, Length[d] - 1, p}];
       Return[t];
    ] (* Complement of A002531 *)
    a[3, 20] (* Gerry Martens, Jun 07 2015 *)
    Round@Table[LucasL[2n+1, Sqrt[2]]/Sqrt[2], {n, 0, 20}] (* Vladimir Reshetnikov, Sep 15 2016 *)
  • PARI
    {a(n) = real( (2 + quadgen(12))^n * (1 + quadgen(12)) )}; /* Michael Somos, Sep 19 2008 */
    
  • PARI
    {a(n) = subst( polchebyshev(n-1, 2) + polchebyshev(n, 2), x, 2)}; /* Michael Somos, Sep 19 2008 */
    
  • SageMath
    [(lucas_number2(n,4,1)-lucas_number2(n-1,4,1))/2 for n in range(1, 27)] # Zerinvary Lajos, Nov 10 2009
    

Formula

a(n) = ((1 + sqrt(3))^(2*n + 1) + (1 - sqrt(3))^(2*n + 1))/2^(n + 1). - N. J. A. Sloane, Nov 10 2009
a(n) = (1/2) * ((1 + sqrt(3))*(2 + sqrt(3))^n + (1 - sqrt(3))*(2 - sqrt(3))^n). - Dean Hickerson, Dec 01 2002
From Mario Catalani, Apr 11 2003: (Start)
With a = 2 + sqrt(3), b = 2 - sqrt(3): a(n) = (1/sqrt(2))(a^(n + 1/2) - b^(n + 1/2)).
a(n) - a(n-1) = A003500(n).
a(n) = sqrt(1 + 12*A061278(n) + 12*A061278(n)^2). (End)
a(n) = ((1 + sqrt(3))^(2*n + 1) + (1 - sqrt(3))^(2*n + 1))/2^(n + 1). - Anton Vrba, Feb 14 2007
G.f.: (1 + x)/((1 - 4*x + x^2)). Simon Plouffe in his 1992 dissertation.
a(n) = S(2*n, sqrt(6)) = S(n, 4) + S(n-1, 4); S(n, x) := U(n, x/2), Chebyshev polynomials of 2nd kind, A049310. S(n, 4) = A001353(n).
For all members x of the sequence, 3*x^2 + 6 is a square. Limit_{n->infinity} a(n)/a(n-1) = 2 + sqrt(3). - Gregory V. Richardson, Oct 10 2002
a(n) = 2*A001571(n) + 1. - Bruce Corrigan (scentman(AT)myfamily.com), Nov 04 2002
Let q(n, x) = Sum_{i=0..n} x^(n - i)*binomial(2*n - i, i); then (-1)^n*q(n, -6) = a(n). - Benoit Cloitre, Nov 10 2002
a(n) = 2^(-n)*Sum_{k>=0} binomial(2*n + 1, 2*k)*3^k; see A091042. - Philippe Deléham, Mar 01 2004
a(n) = floor(sqrt(3)*A001835(n+1)). - Philippe Deléham, Mar 03 2004
a(n+1) - 2*a(n) = 3*A001835(n+1). Using the known relation A001835(n+1) = sqrt((a(n)^2 + 2)/3) it follows that a(n+1) - 2*a(n) = sqrt(3*(a(n)^2 + 2)). Therefore a(n+1)^2 + a(n)^2 - 4*a(n+1)*a(n) - 6 = 0. - Creighton Dement, Apr 18 2005
a(n) = L(n,-4)*(-1)^n, where L is defined as in A108299; see also A001835 for L(n,+4). - Reinhard Zumkeller, Jun 01 2005
a(n) = Jacobi_P(n, 1/2, -1/2, 2)/Jacobi_P(n, -1/2, 1/2, 1). - Paul Barry, Feb 03 2006
Equals binomial transform of A026150 starting (1, 4, 10, 28, 76, ...) and double binomial transform of (1, 3, 3, 9, 9, 27, 27, 81, 81, ...). - Gary W. Adamson, Nov 30 2007
Sequence satisfies 6 = f(a(n), a(n+1)) where f(u, v) = u^2 + v^2 - 4*u*v. - Michael Somos, Sep 19 2008
a(-1-n) = -a(n). - Michael Somos, Sep 19 2008
From Franck Maminirina Ramaharo, Nov 11 2018: (Start)
a(n) = (-1)^n*(5*A125905(n) + A125905(n+1)).
E.g.f.: exp(2*x)*(cosh(sqrt(3)*x) + sqrt(3)*sinh(sqrt(3)*x)). (End)
a(n) = A061278(n+1) - A061278(n-1) for n>=2. - John P. McSorley, Jun 20 2020
From Peter Bala, May 09 2025: (Start)
a(n) = Dir(n, 2), where Dir(n, x) denotes the n-th row polynomial of the triangle A244419.
a(n) - 2*a(n-1) = 3 * A001835(n) for n >= 1.
For arbitrary x, a(n+x)^2 - 4*a(n+x)*a(n+x+1) + a(n+x+1)^2 = 6 with a(n) := (1/2) * ((1 + sqrt(3))*(2 + sqrt(3))^n + (1 - sqrt(3))*(2 - sqrt(3))^n) as above. The particular case x = 0 is noted above,
a(n+1/2) = sqrt(6) * A001353(n+1).
a(n+3/4) + a(n+1/4) = sqrt(6*sqrt(6) + 12) * A001353(n+1).
a(n+3/4) - a(n+1/4) = sqrt(2*sqrt(6) - 4) * A001075(n+1).
Sum_{n >= 1} (-1)^(n+1)/(a(n) - 1/a(n)) = 1/6 (telescoping series: for n >= 1, 1/(a(n) - 1/a(n)) = 1/A001352(n) + 1/A001352(n+1)).
Product_{n >= 1} (a(n) + 1)/(a(n) - 1) = sqrt(3) (telescoping product: Product_{n = 1..k} ((a(n) + 1)/(a(n) - 1))^2 = 3*(1 - 2/A102206(k))). (End)

A140480 RMS numbers: numbers n such that root mean square of divisors of n is an integer.

Original entry on oeis.org

1, 7, 41, 239, 287, 1673, 3055, 6665, 9545, 9799, 9855, 21385, 26095, 34697, 46655, 66815, 68593, 68985, 125255, 155287, 182665, 242879, 273265, 380511, 391345, 404055, 421655, 627215, 730145, 814463, 823537, 876785, 1069895, 1087009, 1166399, 1204281, 1256489
Offset: 1

Views

Author

Ctibor O. Zizka, Jun 29 2008, Jul 11 2008

Keywords

Comments

For any numbers, A and B, both appearing in the sequence, if gcd(A,B)=1, then A*B is also in the sequence. - Andrew Weimholt, Jul 01 2008
The primes in this sequence are the NSW primes (A088165). For the terms less than 2^31, the only powers greater than 1 appearing in the prime factorization of numbers are 3^3 and 13^2. It appears that all terms are +-1 (mod 8). See A224988 for even numbers. - T. D. Noe, Jul 06 2008, Apr 25 2013
A basis for this sequence is given by A002315. This can be considered as the convergents of quasiregular continued fractions or a special 6-ary numeration system (see A. S. Fraenkel) which gives the characterization of positions of some heap or Wythoff game. What is the Sprague-Grundy function of this game?
Sequence generalized: sigma_r-numbers are numbers n for which sigma_r(n)/sigma_0(n) = c^r. Sigma_r(n) denotes sum of r-th powers of divisors of n; c,r positive integers. This sequence are sigma_2-numbers, A003601 are sigma_1-numbers. In a weaker form we have sigma_r(n)/sigma_0(n) = c^t; t is an integer from <1,r>. - Ctibor O. Zizka, Jul 14 2008
The primes in this sequence are prime numerators with an odd index in A001333. The RMS values (A141812) of prime RMS numbers (this sequence) are prime Pell numbers (A000129) with an odd index. - Ctibor O. Zizka, Aug 13 2008
From Ctibor O. Zizka, Aug 30 2008: (Start)
The set of RMS numbers n could be split into subsets according to the number and form of divisors of n. By definition, RMS(n) = sqrt(sigma_2(n) / sigma_0(n)) should be an integer. Now consider some examples. For n prime number, n has 2 divisors [1,n] and we have to solve Pell's equation n^2 = 2*C^2 - 1; C positive integer. The solution is a prime n of the form u(i) = 6*u(i-1) - u(i-2), i >= 2, u(0)=1, u(1)=7, known as an NSW prime (A088165). For n = p_1*p_2, p_1 and p_2 primes, n has 4 divisors {1; p_1; p_2; p_1*p_2}. There are 2 possible cases. Firstly p^2 = (2*C)^2 - 1 which does not hold for any prime p; secondly p_1^2 = 2*C_1^2 - 1 and p_2^2 = 2*C_2^2 - 1; C_1 and C_2 positive integers.
The solution is that p_1 and p_2 are different NSW primes. If n = p^3, divisors of n are {1; p; p^2; p^3} and we have to solve the Diophantine equation (p^8 - 1)/(p - 1) = (2*C)^2. This equation has no solution for any prime p. RMS numbers n with 4 divisors are only of the form n = p_1*p_2, with p_1 and p_2 NSW primes. The general case is n = p_1*...*p_t, n has 2^t divisors, and for t >= 3, NSW primes are not the only solution. If some of the prime divisors are equals p_i = p_j = ... = p_k, the general case n = p_1*...*p_t is "degenerate" because of the multiplicity of prime factors and therefore n has fewer than 2^t divisors. (End)
General recurrence is a(n) = (a(1)-1)*a(n-1) - a(n-2), a(1) >= 4, lim_{n->infinity} a(n) = x*(k*x+1)^n, k = a(1) - 3, x = (1 + sqrt((a(1)+1)/(a(1)-3)))/2. Examples in OEIS: a(1)=4 gives A002878, whose prime terms give A121534. a(1)=5 gives A001834, whose prime terms give A086386. a(1)=6 gives A030221, whose prime terms {29, 139, 3191, ...} are not a sequence on the OEIS. a(1)=7 gives A002315, whose prime terms give A088165. a(1)=8 gives A033890; the OEIS does not have its prime terms as a sequence (do there exist any prime terms?). a(1)=9 gives A057080, whose prime terms {71, 34649, 16908641, ...} are not a sequence in the OEIS. a(1)=10 gives A057081, whose prime terms {389806471, 192097408520951, ...} are not a sequence in the OEIS. - Ctibor O. Zizka, Sep 02 2008
16 of the first 1660 terms are even (the smallest is 2217231104). The first 16 even terms are all divisible by 30976. - Donovan Johnson, Apr 16 2013
All the 83 even terms up to 10^13 (see A224988) are divisible by 30976. - Giovanni Resta, Oct 29 2019

Crossrefs

Programs

  • Haskell
    a140480 n = a140480_list !! (n-1)
    a140480_list = filter
        ((== 1) . a010052 . (\x -> a001157 x `div` a000005 x)) a020486_list
    -- Reinhard Zumkeller, Jan 15 2013
  • Mathematica
    rmsQ[n_] := IntegerQ[Sqrt[DivisorSigma[2, n]/DivisorSigma[0, n]]]; m = 160000; sel1 = Select[8*Range[0, m]+1, rmsQ]; sel7 = Select[8*Range[m]-1, rmsQ]; Union[sel1, sel7] (* Jean-François Alcover, Aug 31 2011, after T. D. Noe's comment *)
    Select[Range[1300000],IntegerQ[RootMeanSquare[Divisors[#]]]&] (* Harvey P. Dale, Mar 24 2016 *)

Extensions

More terms from T. D. Noe and Andrew Weimholt, Jul 01 2008

A298675 Rectangular array A: first differences of row entries of array A294099, read by antidiagonals.

Original entry on oeis.org

1, 2, -1, 3, 2, -2, 4, 7, 2, -1, 5, 14, 18, 2, 1, 6, 23, 52, 47, 2, 2, 7, 34, 110, 194, 123, 2, 1, 8, 47, 198, 527, 724, 322, 2, -1, 9, 62, 322, 1154, 2525, 2702, 843, 2, -2, 10, 79, 488, 2207, 6726, 12098, 10084, 2207, 2, -1, 11, 98, 702, 3842, 15127, 39202, 57965, 37634, 5778, 2, 1
Offset: 1

Views

Author

Keywords

Comments

From a problem in A269254. For detailed theory, see [Hone].
From Charles L. Hohn, Sep 28 2024: (Start)
For rows n >= 3, values x >= 3 where (x^2-4)/(n^2-4) is a square.
For rows n >= 3, Lim_{k->oo}(T(n, k+1)/T(n, k)) = (sqrt(n^2-4)+n)/2. (End)

Examples

			Array begins:
   1 -1  -2   -1     1      2       1       -1        -2         -1
   2  2   2    2     2      2       2        2         2          2
   3  7  18   47   123    322     843     2207      5778      15127
   4 14  52  194   724   2702   10084    37634    140452     524174
   5 23 110  527  2525  12098   57965   277727   1330670    6375623
   6 34 198 1154  6726  39202  228486  1331714   7761798   45239074
   7 47 322 2207 15127 103682  710647  4870847  33385282  228826127
   8 62 488 3842 30248 238142 1874888 14760962 116212808  914941502
   9 79 702 6239 55449 492802 4379769 38925119 345946302 3074591599
  10 98 970 9602 95050 940898 9313930 92198402 912670090 9034502498
		

Crossrefs

Programs

  • Mathematica
    t[n_, 0] := 2; t[n_, 1] := n; t[n_, k_] := n*t[n, k - 1] - t[n, k - 2]; Table[t[n, k], {n, 10}, {k, 10}] // Grid

Formula

A(n,k) = T_k(n), n >= 1, k >= 1, where T_j(x) = x*T_{j-1}(x) - T_{j-2}(x), j >= 2, T_0(x) = 2, T_1(x) = x, (dilated Chebyshev polynomials of the first kind).

A269254 To find a(n), define a sequence by s(k) = n*s(k-1) - s(k-2), with s(0) = 1, s(1) = n + 1; then a(n) is the smallest index k such that s(k) is prime, or -1 if no such k exists.

Original entry on oeis.org

1, 1, 2, 1, 2, 1, -1, 2, 2, 1, 2, 1, 2, -1, 2, 1, 3, 1, 2, 2, 2, 1, -1, 2, 6, 2, 3, 1, 3, 1, 2, 9, 9, -1, 2, 1, 6, 2, 2, 1, 2, 1, 5, 2, 2, 1, -1, 2, 5, 2, 9, 1, 2, 2, 2, 2, 6, 1, 2, 1, 14, -1, 5, 2, 2, 1, 5, 2, 3, 1, 6, 1, 8, 3, 6, 2, 3, 1, -1, 3, 18, 1, 2, 3, 2, 2, 3, 1, 2, 9, 3, 5, 2, 2, 96, 1, 3, -1, 5, 1, 2, 1, 2, 15, 14, 1, 44, 1, 3, -1
Offset: 1

Views

Author

Arkadiusz Wesolowski, Jul 09 2016

Keywords

Comments

The s(k) sequences can be viewed in A294099, where they appear as rows. - Peter Munn, Aug 31 2020
For n >= 3, a(n) is that positive integer k yielding the smallest prime of the form (x^y - 1/x^y)/(x - 1/x), where x = (sqrt(n+2) +- sqrt(n-2))/2 and y = 2*k + 1, or -1 if no such k exists.
Every positive term belongs to A005097.
When n=7, the sequence {s(k)} is A033890, which is Fibonacci(4i+2), and since x|y <=> F_x|F_y, and 2i+1|4i+2, A033890 is never prime, and so a(7)=-1. For the other -1 terms below 100, see the theorem below and the Klee link - N. J. A. Sloane, Oct 20 2017 and Oct 22 2017
Theorem (Brad Klee): For all n > 2, a(n^2 - 2) = -1. See Klee link for a proof. - L. Edson Jeffery, Oct 22 2017
Theorem (Based on work of Hans Havermann, L. Edson Jeffery, Brad Klee, Don Reble, Bob Selcoe, and N. J. A. Sloane) a(110) = -1. [For proof see link. - N. J. A. Sloane, Oct 23 2017]
From Bob Selcoe, Oct 24 2017, edited by N. J. A. Sloane, Oct 27 2017: (Start)
Suppose n = m^2 - 2, where m >= 3, and let j = m-2, with j >= 1.
For this value of n, the sequence s(k) satisfies s(k) = (c(k) + d(k))*(c(k) - d(k)), where c(0) = 1, d(0) = 0; and for k >= 1: c(k) = (j+2)*c(k-1) - d(k-1), and d(k) = c(k-1). So (as Brad Klee already proved) a(n) = -1 .
We have s(0) = 1 and s(1) = n+1 = j^2 + 4j + 3. In general, the coefficients of s(k) when expanded in powers of j are given by the (4k+2)-th row of A011973 (the triangle of coefficients of Fibonacci polynomials) in reverse order. For example, s(2) = j^4 + 8j^3 + 21j^2 + 20j + 5, s(3) = j^6 + 12j^5 + 55j^4 + 120j^3 + 126j^2 + 56j + 7, etc.
Perhaps the above comments could be generalized to apply to a(110) or to other n for which a(n) = -1?
(End)
For detailed theory, see [Hone]. - L. Edson Jeffery, Feb 09 2018

Examples

			Let b(k) be the recursive sequence defined by the initial conditions b(0) = 1, b(1) = 16, and the recursive equation b(k) = 15*b(k-1) - b(k-2). a(15) = 2 because b(2) = 239 is the smallest prime in b(k).
Let c(k) be the recursive sequence defined by the initial conditions c(0) = 1, c(1) = 18, and the recursive equation c(k) = 17*c(k-1) - c(k-2). a(17) = 3 because c(3) = 5167 is the smallest prime in c(k).
		

Crossrefs

Programs

  • Magma
    lst:=[]; for n in [1..85] do if n gt 2 and IsSquare(n+2) then Append(~lst, -1); else a:=n+1; c:=1; t:=1; if IsPrime(a) then Append(~lst, t); else repeat b:=n*a-c; c:=a; a:=b; t+:=1; until IsPrime(a); Append(~lst, t); end if; end if; end for; lst;
    
  • Mathematica
    kmax = 100;
    a[1] = a[2] = 1;
    a[n_ /; IntegerQ[Sqrt[n+2]]] = -1;
    a[n_] := Module[{s}, s[0] = 1; s[1] = n+1; s[k_] := s[k] = n s[k-1] - s[k-2]; For[k=1, k <= kmax, k++, If[PrimeQ[s[k]], Return[k]]]; Print["For n = ", n, ", k = ", k, " exceeds the limit kmax = ", kmax]; -1];
    Array[a, 110] (* Jean-François Alcover, Aug 05 2018 *)
  • PARI
    allocatemem(2^30);
    default(primelimit,(2^31)+(2^30));
    s(n,k) = if(0==k,1,if(1==k,(1+n),((n*s(n,k-1)) - s(n,k-2))));
    A269254(n) = { my(k=1); if((n>2)&&issquare(2+n),-1,while(!isprime(s(n,k)),k++);(k)); }; \\ Antti Karttunen, Oct 20 2017

Formula

If n is prime then a(n-1) = 1.

Extensions

a(86)-a(94) from Antti Karttunen, Oct 20 2017
a(95)-a(109) appended by L. Edson Jeffery, Oct 22 2017

A294099 Rectangular array read by (upward) antidiagonals: A(n,k) = Sum_{j=0..k} (-1)^floor(j/2)*binomial(k-floor((j+1)/2), floor(j/2))*n^(k-j), n >= 1, k >= 0.

Original entry on oeis.org

1, 1, 2, 1, 3, 1, 1, 4, 5, -1, 1, 5, 11, 7, -2, 1, 6, 19, 29, 9, -1, 1, 7, 29, 71, 76, 11, 1, 1, 8, 41, 139, 265, 199, 13, 2, 1, 9, 55, 239, 666, 989, 521, 15, 1, 1, 10, 71, 377, 1393, 3191, 3691, 1364, 17, -1, 1, 11, 89, 559, 2584, 8119, 15289, 13775, 3571, 19, -2
Offset: 1

Views

Author

Keywords

Comments

This array is used to compute A269254: A269254(n) = least k such that A(n,k) is a prime, or -1 if no such k exists.
For detailed theory, see [Hone]. - L. Edson Jeffery, Feb 09 2018
The array can be extended to k<0 with A(n, k) = -A(n, -k-1) for all k in Z. - Michael Somos, Jun 19 2023

Examples

			Array begins:
  1   2    1    -1     -2      -1        1         2          1          -1
  1   3    5     7      9      11       13        15         17          19
  1   4   11    29     76     199      521      1364       3571        9349
  1   5   19    71    265     989     3691     13775      51409      191861
  1   6   29   139    666    3191    15289     73254     350981     1681651
  1   7   41   239   1393    8119    47321    275807    1607521     9369319
  1   8   55   377   2584   17711   121393    832040    5702887    39088169
  1   9   71   559   4401   34649   272791   2147679   16908641   133121449
  1  10   89   791   7030   62479   555281   4935050   43860169   389806471
  1  11  109  1079  10681  105731  1046629  10360559  102558961  1015229051
		

Crossrefs

Programs

  • Mathematica
    (* Array: *)
    Grid[Table[LinearRecurrence[{n, -1}, {1, 1 + n}, 10], {n, 10}]]
    (* Array antidiagonals flattened (gives this sequence): *)
    A294099[n_, k_] := Sum[(-1)^(Floor[j/2]) Binomial[k - Floor[(j + 1)/2], Floor[j/2]] n^(k - j), {j, 0, k}]; Flatten[Table[A294099[n - k, k], {n, 11}, {k, 0, n - 1}]]
  • PARI
    {A(n, k) = sum(j=0, k, (-1)^(j\2)*binomial(k-(j+1)\2, j\2)*n^(k-j))}; /* Michael Somos, Jun 19 2023 */

Formula

A(n,0) = 1, A(n,1) = n + 1, A(n,k) = n*A(n,k-1) - A(n,k-2), n >= 1, k >= 2.
G.f. for row n: (1 + x)/(1 - n*x + x^2), n >= 1.
A(n, k) = B(-n, k) where B = A299045. - Michael Somos, Jun 19 2023

A299109 Probable primes in A030221.

Original entry on oeis.org

29, 139, 3191, 15289, 350981, 1681651, 20344613659, 2237722536169, 5650248517599839, 1464318118372209903213451940281613111, 471219735266432821374794400248484805597413615642086220363989152195627985749609
Offset: 1

Views

Author

Keywords

Comments

From a problem in A269254. For detailed theory, see [Hone].
Subsequent terms have too many digits to display.

Crossrefs

Formula

a(n) = A030221(A299101(n)).

A298677 a(n) = 110*a(n-1) - a(n-2) for n >= 2, a(0)=1, a(1)=111.

Original entry on oeis.org

1, 111, 12209, 1342879, 147704481, 16246150031, 1786928798929, 196545921732159, 21618264461738561, 2377812544869509551, 261537761671184312049, 28766775971285404815839, 3164083819079723345430241, 348020453322798282592510671, 38279085781688731361830743569, 4210351415532437651518789281919
Offset: 0

Views

Author

Keywords

Comments

Sequence {s_k(110)} of A269254.
The sequence contains no primes; see A269254 for a proof by N. J. A. Sloane.
For detailed theory, see [Hone]. - L. Edson Jeffery, Feb 09 2018

Crossrefs

Programs

  • Mathematica
    s[0, n_] := 1; s[1, n_] := n + 1; s[k_, n_] := n*s[k - 1, n] - s[k - 2, n]; Table[s[k, 110], {k, 0, 15}]
    LinearRecurrence[{110, -1}, {1, 111}, 15]
    CoefficientList[Series[(1 + x)/(1 - 110*x + x^2), {x, 0, 14}], x]
  • PARI
    Vec((1 + x)/(1 - 110*x + x^2) + O(x^20)) \\ Colin Barker, Jan 25 2018

Formula

G.f.: (1 + x)/(1 - 110*x + x^2).
a(n) = (1/18)*((55+12*sqrt(21))^(-n)*(9-2*sqrt(21) + (9+2*sqrt(21))*(55+12*sqrt(21))^(2*n))). - Colin Barker, Jan 25 2018
Showing 1-10 of 34 results. Next