login
The OEIS is supported by the many generous donors to the OEIS Foundation.

 

Logo
Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A087229 Exponent of p=2 in 12n+4 = 3(4n+1)+1. 3
2, 4, 2, 3, 2, 6, 2, 3, 2, 4, 2, 3, 2, 5, 2, 3, 2, 4, 2, 3, 2, 8, 2, 3, 2, 4, 2, 3, 2, 5, 2, 3, 2, 4, 2, 3, 2, 6, 2, 3, 2, 4, 2, 3, 2, 5, 2, 3, 2, 4, 2, 3, 2, 7, 2, 3, 2, 4, 2, 3, 2, 5, 2, 3, 2, 4, 2, 3, 2, 6, 2, 3, 2, 4, 2, 3, 2, 5, 2, 3, 2, 4, 2, 3, 2, 10, 2, 3, 2, 4, 2, 3, 2, 5, 2, 3, 2, 4, 2, 3, 2, 6, 2, 3, 2, 4 (list; graph; refs; listen; history; text; internal format)
OFFSET
0,1
COMMENTS
In the Collatz trajectory of m=4n+1, the first 3x+1 step is followed by a(n) consecutive divide-by-2 steps.
Large shifted overlaps with A085058.
LINKS
FORMULA
a(n) = A007814(A017569(n)). - Antti Karttunen, Oct 09 2018
EXAMPLE
n=85: m = 4*n + 1 = 4*85 + 1 = 341, whose Collatz trajectory begins with 341 -> 1024 followed by a(85)=10 consecutive halving steps.
MATHEMATICA
Table[Part[Part[FactorInteger[12*w+4], 1], 2], {w, 0, 100}]
Table[IntegerExponent[12*n + 4, 2], {n, 0, 100}] (* Amiram Eldar, Feb 03 2022 *)
PROG
(PARI) A087229(n) = valuation((12*n)+4, 2); \\ Antti Karttunen, Oct 09 2018
(Perl) # In 4*n+1 (n>0), find position of first bit that will repeat.
sub a {
my $nv= ((shift() << 2) | 1);
my $bp= 1;
while (($nv & 1) xor ($nv & 2)) {
$nv>>= 1;
$bp++;
}
return $bp;
}
# Ruud H.G. van Tol, Sep 27 2021
CROSSREFS
Sequence in context: A279856 A054507 A182742 * A351432 A320156 A351785
KEYWORD
nonn
AUTHOR
Labos Elemer, Aug 28 2003
EXTENSIONS
Part of the name moved to comments section by Antti Karttunen, Oct 09 2018
a(0) = 2 prepended by Ihar Senkevich, Feb 05 2022
STATUS
approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recents
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified April 16 18:12 EDT 2024. Contains 371750 sequences. (Running on oeis4.)