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

A014915 a(1)=1, a(n) = n*3^(n-1) + a(n-1).

Original entry on oeis.org

1, 7, 34, 142, 547, 2005, 7108, 24604, 83653, 280483, 930022, 3055786, 9964519, 32285041, 104029576, 333612088, 1065406345, 3389929279, 10750918570, 33996147910, 107218620331, 337346390797, 1059110761804, 3318547053652, 10379285465677, 32408789311195, 101039166676078
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Magma
    [((2*n - 1)*3^n + 1)/4: n in [1..30]]; // Vincenzo Librandi, Jun 09 2011
  • Mathematica
    LinearRecurrence[{7, -15, 9}, {1, 7, 34}, 25] (* L. Edson Jeffery, May 08 2015 *)

Formula

From Henry Bottomley, Dec 18 2000: (Start)
a(n) = ((2*n-1)*3^n + 1)/4.
a(n) = 7*a(n-1) - 15*a(n-2) + 9*a(n-3) for n > 3.
a(n) = 1 + 2*3 + 3*3^2 + .. + n*3^(n-1).
a(n) = a(n-1) + A027471(n+1). (End)
G.f.: x/((1-x)*(1-3*x)^2). - Colin Barker, Jul 28 2012
a(n) = f^n(n)/2 with f(x) = 3*x-1. - Glen Gilchrist, Apr 10 2019
E.g.f.: exp(x)*(1 + exp(2*x)*(6*x - 1))/4. - Stefano Spezia, May 14 2024
a(n) = 6*a(n-1) - 9*a(n-2) + 1 for n > 2. - Elmo R. Oliveira, May 24 2025

A217785 Smallest integer s>n such that 1+2*s+3*s^2+...+n*s^{n-1} is prime.

Original entry on oeis.org

3, 12, 12, 9, 21, 12, 26, 23, 30, 24, 138, 33, 80, 32, 54, 192, 48, 40, 4500, 48, 50, 192, 30, 88, 32, 114, 178, 48, 45, 42, 356, 41, 53, 138, 174, 66, 44, 990, 120, 819, 2898, 112, 1052, 122, 164, 132, 108, 77, 540, 198, 106, 135, 237, 98, 234, 162, 83, 720, 3870, 135, 188, 1014, 94, 489, 180, 110, 204, 180, 107, 468, 1542, 508, 218, 608, 88, 102, 228, 140, 3890, 93, 361, 1848, 462, 99, 125, 390, 92, 237, 933, 172, 606, 303, 208, 924, 114, 266, 156, 410, 1330
Offset: 2

Views

Author

Zhi-Wei Sun, Mar 24 2013

Keywords

Comments

Conjecture: For each n=2,3,... there are infinitely many primes of the form 1+2*s+...+n*s^{n-1}, where s is a positive integer; moreover, we have a(n)<12*n^2.
This is related to the following conjecture of the author: The polynomials s_n(x)=sum_{k=0}^n(k+1)x^k (n=1,2,3,...) are all irreducible over the field of rational numbers; moreover, s_n(x) is reducible modulo every prime if and only if n has the form 8k(k+1), where k is a positive integer.
Sum_{k=1..n} k*s^(k-1) = (1+n*s^(n+1)-s^n*(n+1))/(s-1)^2, see A059045. - R. J. Mathar, Mar 29 2013

Examples

			a(20)=4500<12*20^2=4800 since 4500 is the least integer s>20 with 1+2*s+3*s^2+...+20*s^{19} prime.
		

Crossrefs

Cf. A000040.

Programs

  • Mathematica
    A[n_,x_]:=A[n,x]=Sum[(k+1)*x^k,{k,0,n-1}]
    Do[Do[If[PrimeQ[A[n,s]]==True,Print[n," ",s];Goto[aa]],{s,n+1,12*n^2-1}];
    Print[n," ",counterexample];Label[aa];Continue,{n,2,100}]
  • PARI
    f(n,s)=my(t);forstep(k=n,1,-1,t=s*t+k);t
    a(n)=my(s=n);while(!ispseudoprime(f(n,s++)),);s \\ Charles R Greathouse IV, Mar 25 2013

A108283 Triangle read by rows, generated from (..., 3, 2, 1).

Original entry on oeis.org

1, 1, 3, 1, 5, 6, 1, 7, 17, 10, 1, 9, 34, 49, 15, 1, 11, 57, 142, 129, 21, 1, 13, 86, 313, 547, 321, 28, 1, 15, 121, 586, 1593, 2005, 769, 36, 1, 17, 162, 985, 3711, 7737, 7108, 1793, 45, 1, 19, 209, 1534, 7465, 22461, 36409, 24604, 4097, 55, 1, 21, 262, 2257, 13539, 54121, 131836, 167481, 83653, 9217, 66
Offset: 1

Views

Author

Gary W. Adamson, May 30 2005

Keywords

Comments

Inverse binomial transforms of each column form the rows of A108284. Rightmost diagonal = triangular numbers, (A000217); while diagonals going to the left from (1, 3, 6, ...) are A000337 starting with 1: (1, 5, 17, 49, ...); A014915: (1, 7, 34, 142, ...); A014916: (1, 9, 57, ...); A014917: (1, 11, 86, ...).

Examples

			4th column = 10, 49, 142, 313, ... = f(x), x = 1, 2, 3; 4x^3 + 3x^2 + 2x + 1. f(3) = 142.
First few rows of the triangle:
  1;
  1,  3;
  1,  5,  6;
  1,  7, 17,  10;
  1,  9, 34,  49,  15;
  1, 11, 57, 142, 129, 21;
  ...
		

Crossrefs

Programs

  • Maple
    A108283 := proc(n,k)
        local x ;
        x := n-k+1 ;
        add( i*x^(i-1),i=1..k) ;
    end proc:
    seq(seq( A108283(n,k),k=1..n),n=1..10) ; # R. J. Mathar, Sep 14 2016
  • Mathematica
    T[, 1] := 1; T[n, n_] := n (n + 1)/2; T[n_, k_] := (1 - (n - k + 1)^k*(k^2 - k*n + 1))/(n - k)^2; Table[T[n, k], {n, 1, 10}, {k, 1, n}] // Flatten (* Jean-François Alcover, Sep 13 2016 *)

Formula

n-th column = f(x), x = 1, 2, 3; n*x^(n-1) + (n-1)*x^(n-2) + (n-3)*x^(n-3) + ... + 1.
T(n,k) = (1+ (n-k+1)^k*(n*k-k^2-1))/ (n-k)^2, n>k. - Jean-François Alcover, Sep 13 2016

Extensions

More terms from Jean-François Alcover, Sep 13 2016
Showing 1-3 of 3 results.