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.

Previous Showing 11-14 of 14 results.

A244414 Remove highest power of 6 from n.

Original entry on oeis.org

1, 2, 3, 4, 5, 1, 7, 8, 9, 10, 11, 2, 13, 14, 15, 16, 17, 3, 19, 20, 21, 22, 23, 4, 25, 26, 27, 28, 29, 5, 31, 32, 33, 34, 35, 1, 37, 38, 39, 40, 41, 7, 43, 44, 45, 46, 47, 8, 49, 50, 51, 52, 53, 9, 55, 56, 57, 58, 59, 10, 61, 62, 63, 64, 65, 11
Offset: 1

Views

Author

Wolfdieter Lang, Jun 27 2014

Keywords

Comments

This is instance g = 6 of the g-family of sequences, call it r(g,n), where for g >= 2 the highest power of g is removed from n. See the crossrefs.
The present sequence is not multiplicative: a(6) = 1 not a(2)*a(3) = 6. In the prime factor decomposition one has to consider a(2^e2*3^e^3) as one entity, also for e2 >= 0, e3 >= 0 with a(1) = 1, and apply the rule given in the formula section. With this rule the sequence will be multiplicative in an unusual sense. - Wolfdieter Lang, Feb 12 2018

Examples

			a(1) = 1 = 1/6^A122841(1) = 1/6^0.
a(9) = a(2^0*3^2), min(0,2) = 0, a(9) = 2^(0-0)*3^(2-0) = 1*9 = 9.
a(12) = a(2^2*3^1), m = min(2,1) = 1, a(12) = 2^(2-1)*3^(1-1) = 2^1*1 = 2.
a(30) = a(2*3*5) = a(2^1*3^1)*a(5) = 1*a(5) = 5.
		

Crossrefs

A007310, A007913, A008833 are used to express relationship between terms of this sequence.

Programs

  • Mathematica
    a[n_] := n/6^IntegerExponent[n, 6]; Array[a, 66] (* Robert G. Wilson v, Feb 12 2018 *)
  • PARI
    a(n) = n/6^valuation(n,6); \\ Joerg Arndt, Jun 28 2014

Formula

a(n) = n/6^A122841(n), n >= 1.
For n >= 2, a(n) is sort of multiplicative if a(2^e2*3^e3) = 2^(e2 - m)*3^(e3 - m) with m = m(e2, e3) = min(e2, e3), for e2, e3 >= 0, a(1) = 1, and a(p^e) = p^e for primes p >= 5.
From Peter Munn, Jun 04 2020: (Start)
Proximity to being multiplicative may be expressed as follows:
a(n * A007310(k)) = a(n) * a(A007310(k));
a(n^2) = a(n)^2;
a(n) = a(A007913(n)) * a(A008833(n)).
(End)
Sum_{k=1..n} a(k) ~ (3/7) * n^2. - Amiram Eldar, Nov 20 2022

Extensions

Incorrect multiplicity claim corrected by Wolfdieter Lang, Feb 12 2018

A214392 If n mod 4 = 0 then a(n) = n/4, otherwise a(n) = n.

Original entry on oeis.org

0, 1, 2, 3, 1, 5, 6, 7, 2, 9, 10, 11, 3, 13, 14, 15, 4, 17, 18, 19, 5, 21, 22, 23, 6, 25, 26, 27, 7, 29, 30, 31, 8, 33, 34, 35, 9, 37, 38, 39, 10, 41, 42, 43, 11, 45, 46, 47, 12, 49, 50, 51, 13, 53, 54, 55, 14, 57, 58
Offset: 0

Views

Author

Jeremy Gardiner, Jul 15 2012

Keywords

Comments

Equivalent to A065883 for n mod 16 != 0. - Peter Kagey, Sep 02 2015

Examples

			a(16) = 16/4 = 4;
a(17) = 17.
		

Crossrefs

Programs

Formula

From Bruno Berselli, Oct 16 2012: (Start)
G.f.: x*(1+2*x+3*x^2+x^3+3*x^4+2*x^5+x^6)/(1-x^4)^2.
a(n) = ( 1 - (3/16)*(1+(-1)^n)*(1+i^(n(n+1))) )*n, where i=sqrt(-1).
a(n) = a(-n) = 2*a(n-4) - a(n-8). (End)
From Werner Schulte, Jul 08 2018: (Start)
a(n) for n > 0 is multiplicative with a(2^e) = 2^e if e < 2 and a(2^e) = 2^(e-2) if e > 1 otherwise a(p^e) = p^e for prime p > 2 and e >= 0.
Dirichlet g.f.: Sum_{n>0} a(n)/n^s = (1-3/4^s)*zeta(s-1).
Dirichlet inverse b(n) is multiplicative with b(2^e) = (-1)^e * A038754(e), e >= 0, and for prime p > 2: b(p) = -p and b(p^e) = 0 if e > 1. (End)
Sum_{k=1..n} a(k) ~ (13/32) * n^2. - Amiram Eldar, Nov 28 2022

A347840 A surjective map of the positive numbers congruent to 5 modulo 8 (A004770) to the positive numbers congruent to 1, 3, or 7 modulo 8 (A047529).

Original entry on oeis.org

1, 3, 1, 7, 9, 11, 3, 15, 17, 19, 1, 23, 25, 27, 7, 31, 33, 35, 9, 39, 41, 43, 11, 47, 49, 51, 3, 55, 57, 59, 15, 63, 65, 67, 17, 71, 73, 75, 19, 79, 81, 83, 1, 87, 89, 91, 23, 95, 97, 99, 25, 103, 105, 107, 27, 111, 113, 115, 7, 119, 121
Offset: 1

Views

Author

Wolfdieter Lang, Oct 30 2021

Keywords

Comments

This map is obtained from the array A(k, m) given in A347834. There all positive numbers congruent to 5 modulo 8 (A004770) appear uniquely in the columns for m >= 1, and the m = 0 column gives all numbers congruent to {1, 3, 7} (mod 8) (A047529). The surjective map is f: A004770 -> A047529, with b(n) = A004770(n) -> f(b(n)) = a(n).
See also the array A178415 which has permuted rows.
This maps all entries of each row k of the array A(k, m), given in A347834, with columns m >= 1 to the entry A(k, 0) = A047529(k), for k >= 1. The numbers b(n) appear once in the array A for columns m >= 1. Column A(k, 1) = A347836(k) gives the numbers congruent to {5, 32, 29} (mod 32), and each entry for columns m >= 2 is congruent to 21 (mod 32).
The surjective map of the numbers b(n) = 5 + 8*(n-1) = A004770(n), for n >= 1, to A047529 with element a(n), is computed by switching to the companion array A347839 of A347834, with the simple recurrence, removing all factors of 4, and then going back to array A347834. See the formula below. Thanks to Antti Karttunen for motivating me to simplify the prescription, and to add in A347834 the hint for the induction proof that all 5 (mod 8) numbers appear once in the columns n >= 1.
This map f is of interest in the context of the Collatz 3*n+1 conjecture. The (modified) rooted tree with only odd labeled nodes has for each row k of the array A(k, m) (A347834) the same precursor (or (modified) Collatz map given in A075677(n+1), for 2*n+1). Therefore, all nodes with labels b(n) == 5 (mod 8) can be represented by a(n). This leads to a further restricted Collatz tree with only node labels congruent to {1, 3, 7} (mod 8) (A047529).
An even further restricted Collatz tree has only node labels congruent to 1 (mod 8) (A017077), as any positive integer can be written as m*2^(v+1)+2^v-1 or (m,v) where v is the number of trailing 1-bits in binary, and for v > 1 the next odd Collatz successor of (m,v) is (3*m+1,v-1). - Ruud H.G. van Tol, Sep 13 2023

Examples

			The sequence a(n) begins: (b(n) = A004770(n))
-------------------------------------------------------------------------
n:     1  2  3  4  5  6  7  8  9 10 11 12  13  14  15  16  17  18  19  20
b(n):  5 13 21 29 37 45 53 61 69 77 85 93 101 109 117 125 133 141 149 157
a(n):  1  3  1  7  9 11  3 15 17 19  1 23  25  27   7  31  35  35   9  39
-------------------------------------------------------------------------
n:     21  22  23  24  25  26  27  28  29  30  31  32  33  34  35  36  37 ...
b(n): 165 173 181 189 197 205 213 221 229 237 245 253 261 269 277 285 293 ...
a(n):  41  43  11  47  49  51   3  55  57  59  15  63  65  67  17  71  73 ...
-----------------------------------------------------------------------------
n = 6, b(6) = 45 = 13 + 32*1, case a), a(6) = 3 + 8*1 = 11.
n = 7, b(7) = 53 = 21 + 32*1, case b)1), first instance, L(7) = 0, a(7) = 3 + 8*0 = 3.
n = 31, b(31) = 245 = 117 + 128*1, case b)1), second instance, L(31) = 1, a(31) = 7 + 8*1 = 15.
n = 11, b(11) = 85 = 21 + 64*1, A065883(1 + 3*1) = 1, c(11) = 1, case b)2)i), a(11) = 85 = A347834(1, 3).
n = 19, b(19) = 149 = 21 + 64*2, A065883(1 + 3*2) = 7, c(19) = (7 - 1)/3 = 2, case b)2)ii), a(n) = 4*2 + 1 = 9.
		

Crossrefs

Programs

  • Mathematica
    A347840[n_] := NestWhile[Quotient[#, 4] &, 2*n - 1, Mod[#, 8] == 5 &];
    Array[A347840, 100] (* Paolo Xausa, Jun 25 2025 *)
  • PARI
    a(n) = n=2*n-1; while(5==n%8, n>>=2); n; \\ Ruud H.G. van Tol, Sep 13 2023
    
  • PARI
    a(n) = (2*n-1)>>(valuation(3*n-1,2)\2*2); \\ Ruud H.G. van Tol, Sep 20 2023

Formula

a(n) = (2*A065883((3*b(n)+1)/2) - 1)/3, with b(n) = A004770(n), for n >= 1.
a(n) = A385109(8*(n-1)+5). - Ralf Stephan, Jun 18 2025

A350091 a(n) = a(floor(n/4)) for n == 2 (mod 4), otherwise n.

Original entry on oeis.org

0, 1, 0, 3, 4, 5, 1, 7, 8, 9, 0, 11, 12, 13, 3, 15, 16, 17, 4, 19, 20, 21, 5, 23, 24, 25, 1, 27, 28, 29, 7, 31, 32, 33, 8, 35, 36, 37, 9, 39, 40, 41, 0, 43, 44, 45, 11, 47, 48, 49, 12, 51, 52, 53, 13, 55, 56, 57, 3, 59, 60, 61, 15, 63, 64, 65, 16, 67, 68, 69, 17, 71, 72, 73
Offset: 0

Views

Author

Ruud H.G. van Tol, Dec 14 2021

Keywords

Comments

a(n) deletes any trailing '10' bit pairs from n. So in base 4, it removes all trailing '2' digits.

Examples

			Numbers between '' are in base 2: '0'->'0', so a(0)=0. '110'->'1', so a(6)=1. '1010'->'10' -> '0', so a(10)=0. a(floor((2^1000001)/3))=0.
		

Crossrefs

Cf. A006519, A139391, A001511, A065883 (chop trailing 00 bit pairs), A347840.

Programs

  • Mathematica
    a[n_] := a[n] = If[Mod[n, 4] == 2, a[(n - 2)/4], n]; Array[a, 100, 0] (* Amiram Eldar, Dec 14 2021 *)
  • PARI
    a(n) = if(2!=(n%4), n, my(m=3*n+2); m=m/4^valuation(m,4);(m+1)/3-1)

Formula

A139391(2*a(n)+1) = A139391(2*n+1).
Sum_{k=1..n} a(k) ~ 2 * n^2 / 5. - Amiram Eldar, Aug 30 2024
a(n) = (A347840(n+1) - 1)/2. - Alan Michael Gómez Calderón, Dec 08 2024
Previous Showing 11-14 of 14 results.