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

A261399 a(1)=1; thereafter a(n) = (2/5)*(9*6^(n-2)+1).

Original entry on oeis.org

1, 4, 22, 130, 778, 4666, 27994, 167962, 1007770, 6046618, 36279706, 217678234, 1306069402, 7836416410, 47018498458, 282110990746, 1692665944474, 10155995666842, 60935974001050, 365615844006298, 2193695064037786, 13162170384226714, 78973022305360282, 473838133832161690
Offset: 1

Views

Author

N. J. A. Sloane, Aug 19 2015

Keywords

Comments

Partial sums of A081341. - Klaus Purath, Jul 28 2020

Crossrefs

The number 22, the third term here, is the same 22 seen in A261400 and illustrated in a link in that entry.
Cf. A199412.

Formula

G.f.: x-2*x^2*(-2+3*x) / ( (6*x-1)*(x-1) ). - R. J. Mathar, Aug 19 2015
a(n) = 2*A199412(n-2), n>1. - R. J. Mathar, Aug 19 2015
From Klaus Purath, Jul 28 2020: (Start)
a(n) = 7*a(n-1) - 6*a(n-2), n > 2.
a(n) = 6*a(n-1) - 2, n > 1.
a(n) = 3*6^(n-2) + a(n-1), n > 1.
(End)

A377621 a(n) is the number of iterations of x -> 6*x - 1 until (# composites reached) = (# primes reached), starting with prime(n).

Original entry on oeis.org

11, 7, 7, 3, 1, 1, 3, 5, 5, 5, 1, 1, 1, 3, 3, 5, 3, 1, 3, 1, 1, 1, 1, 1, 1, 1, 5, 3, 5, 3, 3, 1, 3, 1, 1, 1, 3, 5, 1, 1, 1, 1, 1, 1, 9, 3, 1, 1, 5, 7, 1, 9, 1, 1, 1, 1, 9, 1, 1, 1, 5, 1, 1, 1, 5, 3, 1, 1, 3, 1, 1, 5, 1, 7, 3, 9, 7, 3, 1, 1, 1, 1, 1, 1, 7, 3
Offset: 1

Views

Author

Clark Kimberling, Nov 20 2024

Keywords

Comments

For a guide to related sequences, see A377609.

Examples

			Starting with prime(1) = 2, we have 6*2-1 = 11, then 6*11-1 = 65, etc., resulting in a chain 2, 11, 65, 389, 2333, 13997, 83981, 503885, 3023309, 18139853, 108839117, 653034701 having 6 primes and 6 composites. Since every initial subchain has fewer composites than primes, a(1) = 12-1 = 11. (For more terms from the mapping x -> 6x-1, see A199412.)
		

Crossrefs

Programs

  • Mathematica
    chain[{start_, u_, v_}] := If[CoprimeQ[u, v] && start*u + v != start,
       NestWhile[Append[#, u*Last[#] + v] &, {start}, !
          Count[#, ?PrimeQ] == Count[#, ?(! PrimeQ[#] &)] &], {}];
    chain[{Prime[1], 6, -1}]
    Map[Length[chain[{Prime[#], 6, -1}]] &, Range[1, 100]] - 1
    (* Peter J. C. Moses, Oct 31 2024 *)
Showing 1-2 of 2 results.