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.

A370658 Numbers k such that (3^k + 3*k)/3 is prime.

Original entry on oeis.org

1, 2, 4, 16, 46, 118, 160, 3740, 3778, 9704, 10624, 21460
Offset: 1

Views

Author

Hugo Pfoertner, Feb 27 2024

Keywords

Comments

If it exists, a(13) > 75000.

Crossrefs

A381705 Length of iteration sequence of shortest unimodal Collatz (3x+1)/2 sequence that begins with exactly n increases and ends with continuous decreases until reaching 1.

Original entry on oeis.org

3, 6, 13, 32, 87, 250, 737, 2196, 6571, 19694, 59061, 177160, 531455, 1594338, 4782985, 14348924, 43046739, 129140182, 387420509, 1162261488, 3486784423, 10460353226, 31381059633, 94143178852, 282429536507, 847288609470, 2541865828357, 7625597485016, 22876792454991
Offset: 1

Views

Author

David Dewan, Mar 04 2025

Keywords

Comments

A unimodal Collatz sequence has one peak because it starts with only odd numbers (which increase) followed by only even numbers (which decrease). It uses the rule odd x -> (3x+1)/2.
A sequence of length a(n) starts with exactly n odd numbers and ends with 3^(n-1) even numbers and the final 1 for a total length of n + 3^(n-1) + 1.
The peak of a given sequence is 2^(3^(n-1)). See A023365.

Examples

			For n=2, the shortest unimodal sequence has length a(2) = 6 terms and one such sequence is
  3 -> 5 ->  8  -> 4 -> 2 -> 1
    \-----/     \----------/
  2 increases, then decreases
		

Crossrefs

Programs

  • Mathematica
    LinearRecurrence[{5,-7,3},{3,6,13},29] (* James C. McMahon, Apr 02 2025 *)

Formula

a(n) = n + 3^(n-1) + 1.
From Stefano Spezia, Mar 07 2025: (Start)
G.f.: x*(3 - 9*x + 4*x^2)/((1 - x)^2*(1 - 3*x)).
E.g.f.: (exp(3*x) + 3*exp(x)*(1 + x) - 4)/3. (End)
Showing 1-2 of 2 results.