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-10 of 18 results. Next

A264995 Bijective base-5 reverse: a(0) = 0; for n >= 1, a(n) = A030104(A132739(n)) * A060904(n).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 11, 16, 21, 10, 7, 12, 17, 22, 15, 8, 13, 18, 23, 20, 9, 14, 19, 24, 25, 26, 51, 76, 101, 30, 31, 56, 81, 106, 55, 36, 61, 86, 111, 80, 41, 66, 91, 116, 105, 46, 71, 96, 121, 50, 27, 52, 77, 102, 35, 32, 57, 82, 107, 60, 37, 62, 87, 112, 85, 42, 67, 92, 117, 110, 47, 72, 97, 122, 75, 28, 53, 78, 103, 40, 33
Offset: 0

Views

Author

Antti Karttunen, Dec 07 2015

Keywords

Comments

Self-inverse permutation of nonnegative integers.

Crossrefs

Cf. similar sequences A057889 (base-2), A263273 (base-3), A264994 (base-4), A264979 (base-9).

Programs

Formula

a(0) = 0; for n >= 1, a(n) = A030104(A132739(n)) * A060904(n).
Other identities. For all n >= 0:
a(5*n) = 5*a(n).
A010873(a(n)) = 0 if and only if A010873(n) = 0 and it also seems that A010873(a(n)) = A010873(n) for all n.

A349487 a(n) = A132739((n-5)*(n+5)).

Original entry on oeis.org

11, 24, 39, 56, 3, 96, 119, 144, 171, 8, 231, 264, 299, 336, 3, 416, 459, 504, 551, 24, 651, 704, 759, 816, 7, 936, 999, 1064, 1131, 48, 1271, 1344, 1419, 1496, 63, 1656, 1739, 1824, 1911, 16, 2091, 2184, 2279, 2376, 99, 2576, 2679, 2784, 2891, 24, 3111
Offset: 6

Views

Author

Simon Strandgaard, Nov 19 2021

Keywords

Comments

Shares 614 initial terms with A061043. First difference is A061043(620)=615 vs. a(620)=123.

Examples

			a(9)  = A132739(( 9-5)*( 9+5)) = A132739(56) = 56,
a(10) = A132739((10-5)*(10+5)) = A132739(75) = 3,
a(11) = A132739((11-5)*(11+5)) = A132739(96) = 96.
		

Crossrefs

Programs

  • Mathematica
    Table[Last@Select[Divisors[(n - 5)*(n + 5)], Mod[#, 5] != 0 &], {n, 6,
       56}] (* Giorgos Kalogeropoulos, Nov 19 2021 *)
    Table[(n - 5)*(n + 5)/5^IntegerExponent[(n - 5)*(n + 5), 5], {n, 6, 56}] (* Amiram Eldar, Nov 22 2021 *)
  • PARI
    A132739(n)=n/5^valuation(n, 5);
    a(n) = A132739((n-5)*(n+5));
    [a(n)|n<-[6..25]]
    
  • Python
    def A349487(n):
        a, b = divmod(n*n-25, 5)
        while b == 0:
            a, b = divmod(a,5)
        return 5*a+b # Chai Wah Wu, Dec 05 2021
  • Ruby
    p (6..25).map { |n| x = (n-5)*(n+5); x /= 5 while (x % 5) == 0; x }
    

Formula

a(n) = A132739(A098603(n-5)).

A000265 Remove all factors of 2 from n; or largest odd divisor of n; or odd part of n.

Original entry on oeis.org

1, 1, 3, 1, 5, 3, 7, 1, 9, 5, 11, 3, 13, 7, 15, 1, 17, 9, 19, 5, 21, 11, 23, 3, 25, 13, 27, 7, 29, 15, 31, 1, 33, 17, 35, 9, 37, 19, 39, 5, 41, 21, 43, 11, 45, 23, 47, 3, 49, 25, 51, 13, 53, 27, 55, 7, 57, 29, 59, 15, 61, 31, 63, 1, 65, 33, 67, 17, 69, 35, 71, 9, 73, 37, 75, 19, 77
Offset: 1

Views

Author

Keywords

Comments

When n > 0 is written as k*2^j with k odd then k = A000265(n) and j = A007814(n), so: when n is written as k*2^j - 1 with k odd then k = A000265(n+1) and j = A007814(n+1), when n > 1 is written as k*2^j + 1 with k odd then k = A000265(n-1) and j = A007814(n-1).
Also denominator of 2^n/n (numerator is A075101(n)). - Reinhard Zumkeller, Sep 01 2002
Slope of line connecting (o, a(o)) where o = (2^k)(n-1) + 1 is 2^k and (by design) starts at (1, 1). - Josh Locker (joshlocker(AT)macfora.com), Apr 17 2004
Numerator of n/2^(n-1). - Alexander Adamchuk, Feb 11 2005
From Marco Matosic, Jun 29 2005: (Start)
"The sequence can be arranged in a table:
1
1 3 1
1 5 3 7 1
1 9 5 11 3 13 7 15 1
1 17 9 19 5 21 11 23 3 25 13 27 7 29 15 31 1
Every new row is the previous row interspaced with the continuation of the odd numbers.
Except for the ones; the terms (t) in each column are t+t+/-s = t_+1. Starting from the center column of threes and working to the left the values of s are given by A000265 and working to the right by A000265." (End)
This is a fractal sequence. The odd-numbered elements give the odd natural numbers. If these elements are removed, the original sequence is recovered. - Kerry Mitchell, Dec 07 2005
2k + 1 is the k-th and largest of the subsequence of k terms separating two successive equal entries in a(n). - Lekraj Beedassy, Dec 30 2005
It's not difficult to show that the sum of the first 2^n terms is (4^n + 2)/3. - Nick Hobson, Jan 14 2005
In the table, for each row, (sum of terms between 3 and 1) - (sum of terms between 1 and 3) = A020988. - Eric Desbiaux, May 27 2009
This sequence appears in the analysis of A160469 and A156769, which resemble the numerator and denominator of the Taylor series for tan(x). - Johannes W. Meijer, May 24 2009
Indices n such that a(n) divides 2^n - 1 are listed in A068563. - Max Alekseyev, Aug 25 2013
From Alexander R. Povolotsky, Dec 17 2014: (Start)
With regard to the tabular presentation described in the comment by Marco Matosic: in his drawing, starting with the 3rd row, the first term in the row, which is equal to 1 (or, alternatively the last term in the row, which is also equal to 1), is not in the actual sequence and is added to the drawing as a fictitious term (for the sake of symmetry); an actual A000265(n) could be considered to be a(j,k) (where j >= 1 is the row number and k>=1 is the column subscript), such that a(j,1) = 1:
1
1 3
1 5 3 7
1 9 5 11 3 13 7 15
1 17 9 19 5 21 11 23 3 25 13 27 7 29 15 31
and so on ... .
The relationship between k and j for each row is 1 <= k <= 2^(j-1). In this corrected tabular representation, Marco's notion that "every new row is the previous row interspaced with the continuation of the odd numbers" remains true. (End)
Partitions natural numbers to the same equivalence classes as A064989. That is, for all i, j: a(i) = a(j) <=> A064989(i) = A064989(j). There are dozens of other such sequences (like A003602) for which this also holds: In general, all sequences for which a(2n) = a(n) and the odd bisection is injective. - Antti Karttunen, Apr 15 2017
From Paul Curtz, Feb 19 2019: (Start)
This sequence is the truncated triangle:
1, 1;
3, 1, 5;
3, 7, 1, 9;
5, 11, 3, 13, 7;
15, 1, 17, 9, 19, 5;
21, 11, 23, 3, 25, 13, 27;
7, 29, 15, 31, 1, 33, 17, 35;
...
The first column is A069834. The second column is A213671. The main diagonal is A236999. The first upper diagonal is A125650 without 0.
c(n) = ((n*(n+1)/2))/A069834 = 1, 1, 2, 2, 1, 1, 4, 4, 1, 1, 2, 2, 1, 1, 8, 8, 1, 1, ... for n > 0. n*(n+1)/2 is the rank of A069834. (End)
As well as being multiplicative, a(n) is a strong divisibility sequence, that is, gcd(a(n),a(m)) = a(gcd(n,m)) for n, m >= 1. In particular, a(n) is a divisibility sequence: if n divides m then a(n) divides a(m). - Peter Bala, Feb 27 2019
a(n) is also the map n -> A026741(n) applied at least A007814(n) times. - Federico Provvedi, Dec 14 2021

Examples

			G.f. = x + x^2 + 3*x^3 + x^4 + 5*x^5 + 3*x^6 + 7*x^7 + x^8 + 9*x^9 + 5*x^10 + 11*x^11 + ...
		

References

  • N. J. A. Sloane, A Handbook of Integer Sequences, Academic Press, 1973 (includes this sequence).
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).

Crossrefs

Cf. A049606 (partial products), A135013 (partial sums), A099545 (mod 4), A326937 (Dirichlet inverse).
Cf. A026741 (map), A001511 (converging steps), A038550 (prime index).
Cf. A195056 (Dgf at s=3).

Programs

  • Haskell
    a000265 = until odd (`div` 2)
    -- Reinhard Zumkeller, Jan 08 2013, Apr 08 2011, Oct 14 2010
    
  • Java
    int A000265(n){
        while(n%2==0) n>>=1;
        return n;
    }
    /* Aidan Simmons, Feb 24 2019 */
    
  • Julia
    using IntegerSequences
    [OddPart(n) for n in 1:77] |> println  # Peter Luschny, Sep 25 2021
    
  • Magma
    A000265:= func< n | n/2^Valuation(n,2) >;
    [A000265(n): n in [1..120]]; // G. C. Greubel, Jul 31 2024
    
  • Maple
    A000265:=proc(n) local t1,d; t1:=1; for d from 1 by 2 to n do if n mod d = 0 then t1:=d; fi; od; t1; end: seq(A000265(n), n=1..77);
    A000265 := n -> n/2^padic[ordp](n,2): seq(A000265(n), n=1..77); # Peter Luschny, Nov 26 2010
  • Mathematica
    a[n_Integer /; n > 0] := n/2^IntegerExponent[n, 2]; Array[a, 77] (* Josh Locker *)
    a[ n_] := If[ n == 0, 0, n / 2^IntegerExponent[ n, 2]]; (* Michael Somos, Dec 17 2014 *)
  • PARI
    {a(n) = n >> valuation(n, 2)}; /* Michael Somos, Aug 09 2006, edited by M. F. Hasler, Dec 18 2014 */
    
  • Python
    from _future_ import division
    def A000265(n):
        while not n % 2:
            n //= 2
        return n # Chai Wah Wu, Mar 25 2018
    
  • Python
    def a(n):
        while not n&1: n >>= 1
        return n
    print([a(n) for n in range(1, 78)]) # Michael S. Branicky, Jun 26 2025
    
  • SageMath
    def A000265(n): return n//2^valuation(n,2)
    [A000265(n) for n in (1..121)] # G. C. Greubel, Jul 31 2024
  • Scheme
    (define (A000265 n) (let loop ((n n)) (if (odd? n) n (loop (/ n 2))))) ;; Antti Karttunen, Apr 15 2017
    

Formula

a(n) = if n is odd then n, otherwise a(n/2). - Reinhard Zumkeller, Sep 01 2002
a(n) = n/A006519(n) = 2*A025480(n-1) + 1.
Multiplicative with a(p^e) = 1 if p = 2, p^e if p > 2. - David W. Wilson, Aug 01 2001
a(n) = Sum_{d divides n and d is odd} phi(d). - Vladeta Jovovic, Dec 04 2002
G.f.: -x/(1 - x) + Sum_{k>=0} (2*x^(2^k)/(1 - 2*x^(2^(k+1)) + x^(2^(k+2)))). - Ralf Stephan, Sep 05 2003
(a(k), a(2k), a(3k), ...) = a(k)*(a(1), a(2), a(3), ...) In general, a(n*m) = a(n)*a(m). - Josh Locker (jlocker(AT)mail.rochester.edu), Oct 04 2005
a(n) = Sum_{k=0..n} A127793(n,k)*floor((k+2)/2) (conjecture). - Paul Barry, Jan 29 2007
Dirichlet g.f.: zeta(s-1)*(2^s - 2)/(2^s - 1). - Ralf Stephan, Jun 18 2007
a(A132739(n)) = A132739(a(n)) = A132740(n). - Reinhard Zumkeller, Aug 27 2007
a(n) = 2*A003602(n) - 1. - Franklin T. Adams-Watters, Jul 02 2009
a(n) = n/gcd(2^n,n). (This also shows that the true offset is 0 and a(0) = 0.) - Peter Luschny, Nov 14 2009
a(-n) = -a(n) for all n in Z. - Michael Somos, Sep 19 2011
From Reinhard Zumkeller, May 01 2012: (Start)
A182469(n, k) = A027750(a(n), k), k = 1..A001227(n).
a(n) = A182469(n, A001227(n)). (End)
a((2*n-1)*2^p) = 2*n - 1, p >= 0 and n >= 1. - Johannes W. Meijer, Feb 05 2013
G.f.: G(0)/(1 - 2*x^2 + x^4) - 1/(1 - x), where G(k) = 1 + 1/(1 - x^(2^k)*(1 - 2*x^(2^(k+1)) + x^(2^(k+2)))/(x^(2^k)*(1 - 2*x^(2^(k+1)) + x^(2^(k+2))) + (1 - 2*x^(2^(k+2)) + x^(2^(k+3)))/G(k+1))); (continued fraction). - Sergei N. Gladkovskii, Aug 06 2013
a(n) = A003961(A064989(n)). - Antti Karttunen, Apr 15 2017
Completely multiplicative with a(2) = 1 and a(p) = p for prime p > 2, i.e., the sequence b(n) = a(n) * A008683(n) for n > 0 is the Dirichlet inverse of a(n). - Werner Schulte, Jul 08 2018
From Peter Bala, Feb 27 2019: (Start)
O.g.f.: F(x) - F(x^2) - F(x^4) - F(x^8) - ..., where F(x) = x/(1 - x)^2 is the generating function for the positive integers.
O.g.f. for reciprocals: Sum_{n >= 1} x^n/a(n) = L(x) + (1/2)*L(x^2) + (1/2)*L(x^4) + (1/2)*L(x^8) + ..., where L(x) = log(1/(1 - x)).
Sum_{n >= 1} x^n/a(n) = 1/2*log(G(x)), where G(x) = 1 + 2*x + 4*x^2 + 6*x^3 + 10*x^4 + ... is the o.g.f. of A000123. (End)
O.g.f.: Sum_{n >= 1} phi(2*n-1)*x^(2*n-1)/(1 - x^(2*n-1)), where phi(n) is the Euler totient function A000010. - Peter Bala, Mar 22 2019
a(n) = A049606(n) / A049606(n-1). - Flávio V. Fernandes, Dec 08 2020
a(n) = numerator of n/2^(floor(n/2)). - Federico Provvedi, Dec 14 2021
a(n) = Sum_{d divides n} (-1)^(d+1)*phi(2*n/d). - Peter Bala, Jan 14 2024
a(n) = A030101(A030101(n)). - Darío Clavijo, Sep 19 2024

Extensions

Additional comments from Henry Bottomley, Mar 02 2000
More terms from Larry Reeves (larryr(AT)acm.org), Mar 14 2000
Name clarified by David A. Corneth, Apr 15 2017

A038502 Remove 3's from n.

Original entry on oeis.org

1, 2, 1, 4, 5, 2, 7, 8, 1, 10, 11, 4, 13, 14, 5, 16, 17, 2, 19, 20, 7, 22, 23, 8, 25, 26, 1, 28, 29, 10, 31, 32, 11, 34, 35, 4, 37, 38, 13, 40, 41, 14, 43, 44, 5, 46, 47, 16, 49, 50, 17, 52, 53, 2, 55, 56, 19, 58, 59, 20, 61, 62, 7, 64, 65, 22, 67, 68, 23, 70, 71, 8, 73, 74, 25, 76
Offset: 1

Views

Author

Keywords

Comments

As well as being multiplicative, a(n) is a strong divisibility sequence, that is, gcd(a(n),a(m)) = a(gcd(n,m)) for n, m >= 1. In particular, a(n) is a divisibility sequence: if n divides m then a(n) divides a(m). - Peter Bala, Feb 21 2019
The largest divisor of n not divisible by 3. - Amiram Eldar, Sep 15 2020

Examples

			From _Peter Bala_, Feb 21 2019: (Start)
Sum_{n >= 1} n*a(n)*x^n = G(x) - (2*3)*G(x^3) - (2*9)*G(x^9) - (2*27)*G(x^27) - ..., where G(x) = x*(1 + x)/(1 - x)^3.
Sum_{n >= 1} (1/n)*a(n)*x^n = H(x) - (2/3)*H(x^3) - (2/9)*H(x^9) - (2/27)*H(x^27) - ..., where H(x) = x/(1 - x).
Sum_{n >= 1} (1/n^2)*a(n)*x^n = L(x) - (2/3^2)*L(x^3) - (2/9^2)*L(x^9) - (2/27^2)*L(x^27) - ..., where L(x) = Log(1/(1 - x)).
Also, Sum_{n >= 1} 1/a(n)*x^n = L(x) + (2/3)*L(x^3) + (2/3)*L(x^9) + (2/3)*L(x^27) + ... .
(End)
		

Crossrefs

Result of iterative removal of other factors: A000265 (2), A065883 (4), A132739 (5), A244414 (6), A242603 (7), A004151 (10).

Programs

  • Haskell
    a038502 n = if m > 0 then n else a038502 n'  where (n', m) = divMod n 3
    -- Reinhard Zumkeller, Jan 03 2011
    
  • Magma
    [n/3^Valuation(n,3): n in [1..80]]; // Bruno Berselli, May 21 2013
  • Mathematica
    f[n_] := Times @@ (First@#^Last@# & /@ Select[ FactorInteger@n, First@# != 3 &]); Array[f, 76] (* Robert G. Wilson v, Jul 31 2006 *)
    Table[n/3^IntegerExponent[n, 3], {n, 100}] (* Amiram Eldar, Sep 15 2020 *)
  • PARI
    a(n)=if(n<1, 0, n/3^valuation(n,3)) /* Michael Somos, Nov 10 2005 */
    

Formula

Multiplicative with a(p^e) = 1 if p = 3, otherwise p^e. - Mitch Harris, Apr 19 2005
a(0) = 0, a(3*n) = a(n), a(3*n+1) = 3*n+1, a(3*n+2) = 3*n+2.
Dirichlet g.f. zeta(s-1)*(3^s-3)/(3^s-1). - R. J. Mathar, Feb 11 2011
From Peter Bala, Feb 21 2019: (Start)
a(n) = n/gcd(n,3^n).
O.g.f.: F(x) - 2*F(x^3) - 2*F(x^9) - 2*F(x^27) - ..., where F(x) = x/(1 - x)^2 is the generating function for the positive integers. More generally, for m >= 1,
Sum_{n >= 0} a(n)^m*x^n = F(m,x) - (3^m - 1)( F(m,x^3) + F(m,x^9) + F(m,x^27) + ... ), where F(m,x) = A(m,x)/(1 - x)^(m+1) with A(m,x) the m_th Eulerian polynomial: A(1,x) = x, A(2,x) = x*(1 + x), A(3,x) = x*(1 + 4*x + x^2) - see A008292.
Repeatedly applying the Euler operator x*d/dx or its inverse operator to the o.g.f. for the sequence produces generating functions for the sequences n^m*a(n), m in Z. Some examples are given below. (End)
Sum_{k=1..n} a(k) ~ (3/8) * n^2. - Amiram Eldar, Oct 29 2022
a(n) = n / A038500(n). - R. J. Mathar, Mar 13 2024

A060904 Largest power of 5 that divides n.

Original entry on oeis.org

1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 25, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 25, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 25, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1
Offset: 1

Views

Author

Ahmed Fares (ahmedfares(AT)my-deja.com), May 06 2001

Keywords

Comments

Also the largest power of 5 that divides the n-th Fibonacci number A000045(n).
Multiplicative with a(p^e) = 5^e if p = 5, else a(p^e) = 1. - Mitch Harris, Apr 19 2005
Also 5-adic value of 1/n, n >= 1. See the Mahler reference, definition on p. 7. This is a non-archimedean valuation. See Mahler, p. 10. Sometimes also called 5-adic absolute value. - Wolfdieter Lang, Jun 30 2014

Examples

			a(10) = 5 because 10 = 5 * 2.
		

References

  • Kurt Mahler, p-adic numbers and their functions, second ed., Cambridge University Press, 1981.

Crossrefs

Programs

Formula

If n is not divisible by 5, then a(n) = 1. If n = 5^k * m where m is not divisible by 5, then a(n) = 5^k.
Dirichlet g.f.: zeta(s)*(5^s-1)/(5^s-5). - R. J. Mathar, Jul 12 2012
a(n) = 5^A112765(n). - Tom Edgar, Mar 22 2014
From Peter Bala, Feb 21 2019: (Start)
a(n) = gcd(n,5^n).
a(n) = n/A132739(n).
O.g.f.: x/(1 - x) + 4*Sum_{n >= 1} 5^(n-1)*x^(5^n)/ (1 - x^(5^n)). (End).
a(n) = (1/5)*(sigma(5*n) - sigma(n))/(sigma(5*n) - 5*sigma(n)), where sigma(n) = A000203(n). - Peter Bala, Jun 10 2022
Sum_{k=1..n} a(k) ~ (4/(5*log(5)))*n*log(n) + (3/5 + 4*(gamma-1)/(5*log(5)))*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 15 2022

Extensions

More terms from Larry Reeves (larryr(AT)acm.org), May 07 2001
Edited by Joerg Arndt and M. F. Hasler, Dec 29 2015

A132740 Largest divisor of n coprime to 10.

Original entry on oeis.org

1, 1, 3, 1, 1, 3, 7, 1, 9, 1, 11, 3, 13, 7, 3, 1, 17, 9, 19, 1, 21, 11, 23, 3, 1, 13, 27, 7, 29, 3, 31, 1, 33, 17, 7, 9, 37, 19, 39, 1, 41, 21, 43, 11, 9, 23, 47, 3, 49, 1, 51, 13, 53, 27, 11, 7, 57, 29, 59, 3, 61, 31, 63, 1, 13, 33, 67, 17, 69, 7, 71, 9, 73, 37, 3, 19, 77, 39, 79, 1, 81
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 27 2007

Keywords

Comments

Or: n with all factors of 2 and 5 removed. - M. F. Hasler, Apr 25 2017

Examples

			a(1050) = a(2*3*5*5*7) = 3*7 = 21.
		

Crossrefs

Programs

Formula

a(n) = A000265(A132739(n)) = A132739(A000265(n)) = n / A132741(n);
A051626(a(n)) = A051626(n); A007732(a(n)) = A007732(n);
a(A003592(n)) = 1.
Multiplicative with a(2^e) = 1, a(5^e) = 1 and a(p^e) = p^e for p = 3 and p >= 7.
Dirichlet g.f. zeta(s-1)*(2^s-2)*(5^s-5)/((2^s-1)*(5^s-1)). - R. J. Mathar, Sep 06 2011
Sum_{k=1..n} a(k) ~ (5/18) * n^2. - Amiram Eldar, Nov 28 2022

Extensions

Edited by M. F. Hasler, Apr 25 2017

A065883 Remove factors of 4 from n (i.e., write n in base 4, drop final zeros, then rewrite in decimal).

Original entry on oeis.org

1, 2, 3, 1, 5, 6, 7, 2, 9, 10, 11, 3, 13, 14, 15, 1, 17, 18, 19, 5, 21, 22, 23, 6, 25, 26, 27, 7, 29, 30, 31, 2, 33, 34, 35, 9, 37, 38, 39, 10, 41, 42, 43, 11, 45, 46, 47, 3, 49, 50, 51, 13, 53, 54, 55, 14, 57, 58, 59, 15, 61, 62, 63, 1, 65, 66, 67, 17, 69, 70, 71, 18, 73, 74, 75
Offset: 1

Views

Author

Henry Bottomley, Nov 26 2001

Keywords

Examples

			a(7)=7, a(14)=14, a(28)=a(4*7)=7, a(56)=a(4*14)=14, a(112)=a(4^2*7)=7.
		

Crossrefs

Cf. A214392, A235127, A350091 (drop final 2's).
Remove other factors: A000265, A038502, A132739, A244414, A242603, A004151.

Programs

  • Maple
    A065883:= n -> n/4^floor(padic:-ordp(n,2)/2):
    map(A065883, [$1..1000]); # Robert Israel, Dec 08 2015
  • Mathematica
    If[Divisible[#,4],#/4^IntegerExponent[#,4],#]&/@Range[80] (* Harvey P. Dale, Aug 31 2013 *)
  • PARI
    a(n)=n/4^valuation(n,4); \\ Joerg Arndt, Dec 09 2015
    
  • Python
    def A065883(n): return n>>((~n&n-1).bit_length()&-2) # Chai Wah Wu, Jul 09 2022

Formula

If n mod 4 = 0 then a(n) = a(n/4), otherwise a(n) = n.
Multiplicative with a(p^e) = 2^(e (mod 2)) if p = 2 and a(p^e) = p^e if p is an odd prime.
a(n) = n/4^A235127(n).
a(n) = A214392(n) if n mod 16 != 0. - Peter Kagey, Sep 02 2015
From Robert Israel, Dec 08 2015: (Start)
G.f.: x/(1-x)^2 - 3 Sum_{j>=1} x^(4^j)/(1-x^(4^j))^2.
G.f. satisfies G(x) = G(x^4) + x/(1-x)^2 - 4 x^4/(1-x^4)^2. (End)
Sum_{k=1..n} a(k) ~ (2/5) * n^2. - Amiram Eldar, Nov 20 2022
Dirichlet g.f.: zeta(s-1)*(4^s-4)/(4^s-1). - Amiram Eldar, Jan 04 2023

A242603 Largest divisor of n not divisible by 7. Remove factors 7 from n.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 1, 8, 9, 10, 11, 12, 13, 2, 15, 16, 17, 18, 19, 20, 3, 22, 23, 24, 25, 26, 27, 4, 29, 30, 31, 32, 33, 34, 5, 36, 37, 38, 39, 40, 41, 6, 43, 44, 45, 46, 47, 48, 1, 50, 51, 52, 53, 54, 55, 8, 57, 58, 59, 60, 61, 62, 9, 64, 65, 66, 67, 68, 69, 10, 71, 72, 73, 74, 75, 76, 11
Offset: 1

Views

Author

Wolfdieter Lang, Jun 18 2014

Keywords

Comments

This is member p = 7 in the p-family of sequences (p a prime).
See A000265, A038502 and A132739 for primes 2, 3 and 5, also for formulas, programs and references.
As well as being multiplicative, a(n) is a strong divisibility sequence, that is, gcd(a(n),a(m)) = a(gcd(n,m)) for n, m >= 1. In particular, a(n) is a divisibility sequence: if n divides m then a(n) divides a(m). - Peter Bala, Feb 21 2019

Examples

			From _Indranil Ghosh_, Jan 31 2017: (Start)
For n = 12, the divisors of 12 are 1,2,3,4,6 and 12. The largest divisor not divisible by 7 is 12. So, a(12) = 12.
For n = 14, the divisors of 14 are 1,2,7 and 14. The largest divisor not divisible by 7 is 2. So, a(14) = 2. (End)
From _Peter Bala_, Feb 21 2019: (Start)
Sum_{n >= 1} n*a(n)*x^n = G(x) - (6*7)*G(x^7) - (6*49)*G(x^49) - (6*343)*G(x^343) - ..., where G(x) = x*(1 + x)/(1 - x)^3.
Sum_{n >= 1} (1/n)*a(n)*x^n = H(x) - (6/7)*H(x^7) - (6/49)*H(x^49) - (6/343)*H(x^343) - ..., where H(x) = x/(1 - x).
Sum_{n >= 1} (1/n^2)*a(n)*x^n = L(x) - (6/7^2)*L(x^7) - (6/49^2)*L(x^49) - (6/343^2)*L(x^343) - ..., where L(x) = Log(1/(1 - x)).
Also, Sum_{n >= 1} (1/a(n))*x^n = L(x) + (6/7)*L(x^7) + (6/7)*L(x^49) + (6/7)*L(x^343) ... . (End)
		

Crossrefs

Programs

  • Mathematica
    Table[n/7^IntegerExponent[n, 7], {n, 80}] (* Alonso del Arte, Jun 18 2014 *)
  • PARI
    a(n) = f = factor(n);  for (i=1, #f~, if (f[i,1]==7, f[i, 1]=1)); factorback(f); \\ Michel Marcus, Jun 18 2014
    
  • PARI
    a(n) = n \ 7^valuation(n, 7) \\ David A. Corneth, Feb 21 2019
    
  • Python
    def A242603(n):
        for i in range(n,0,-1):
            if n%i==0 and i%7!=0:
                return i # Indranil Ghosh, Jan 31 2017

Formula

Multiplicative with a(p^e) = 1 if p = 7, else p^e.
Dirichlet g.f.: zeta(s-1)*7*(7^(s-1) - 1)/(7^s - 1).
a(n) = n/A268354(n).
From Peter Bala, Feb 21 2019: (Start)
a(n) = n/gcd(n,7^n).
O.g.f.: F(x) - 6*F(x^7) - 6*F(x^49) - 6*F(x^243) - ..., where F(x) = x/(1 - x)^2 is the generating function for the positive integers. More generally, for m >= 1,
Sum_{n >= 0} (a(n)^m)*x^n = F(m,x) - (7^m - 1)( F(m,x^7) + F(m,x^49) + F(m,x^243) + ...), where F(m,x) = A(m,x)/(1 - x)^(m+1) with A(m,x) the m_th Eulerian polynomial: A(1,x) = x, A(2,x) = x*(1 + x), A(3,x) = x*(1 + 4*x + x^2) - see A008292.
Repeatedly applying the Euler operator x*d/dx or its inverse operator to the o.g.f. for the sequence a(n) produces generating functions for the sequences (n^m*a(n))n>=1, m in Z. Some examples are given below. (End)
Sum_{k=1..n} a(k) ~ (7/16) * n^2. - Amiram Eldar, Nov 28 2022

A214684 a(1)=1, a(2)=1, and, for n>2, a(n)=(a(n-1)+a(n-2))/5^k, where 5^k is the highest power of 5 dividing a(n-1)+a(n-2).

Original entry on oeis.org

1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1, 2, 3, 1, 4, 1, 1
Offset: 1

Views

Author

John W. Layman, Jul 25 2012

Keywords

Comments

This sequence is periodic with period 1,1,2,3,1,4 of length 6.
It appears that for most choices of a(1), a(2), and divisor b^k (replacing 5^k), the resulting sequence is not periodic.

Crossrefs

Programs

  • Magma
    I:=[1,1,2,3,1,4]; [n le 6 select I[n] else Self(n-6): n in [1..100]]; // G. C. Greubel, Mar 08 2024
    
  • Mathematica
    CoefficientList[Series[(4*x^5 + x^4 + 3*x^3 + 2*x^2 + x + 1)/((1 - x)*(x + 1)*(x^2 - x + 1)*(x^2 + x + 1)), {x, 0, 100}], x] (* Wesley Ivan Hurt, Jul 08 2014 *)
    LinearRecurrence[{0, 0, 0, 0, 0, 1},{1, 1, 2, 3, 1, 4},80] (* Ray Chandler, Aug 25 2015 *)
  • PARI
    lista(nn) = {va = vector(nn); va[1] = 1; va[2] = 1; for (n=3, nn, sump = va[n-1] + va[n-2]; va[n] = sump/5^(valuation(sump, 5));); va;} \\ Michel Marcus, Jul 08 2014
    
  • PARI
    Vec(-x*(4*x^5+x^4+3*x^3+2*x^2+x+1)/((x-1)*(x+1)*(x^2-x+1)*(x^2+x+1)) + O(x^100)) \\ Colin Barker, Jul 08 2014
    
  • SageMath
    def A214684_list(prec):
        P. = PowerSeriesRing(ZZ, prec)
        return P( x*(1+x+2*x^2+3*x^3+x^4+4*x^5)/(1-x^6) ).list()
    a=A214684_list(100); a[1:] # G. C. Greubel, Mar 08 2024

Formula

a(n) = A132739(a(n-1) + a(n-2)), for n>2, and a(1)=1, a(2)=1. - Michel Marcus, Jul 08 2014
G.f.: x*(1+x+2*x^2+3*x^3+x^4+4*x^5)/((1-x)*(1+x)*(1-x+x^2)*(1+x+x^2)) . - Colin Barker, Jul 08 2014
a(n) = -4*[n=0] + (1/3)*(2 + 2*(-1)^n + A010892(n) - 2*A010892(n-1) + 3*A049347(n) + 3*A049347(n-1)). - G. C. Greubel, Mar 08 2024

A277543 a(n) = n/5^m mod 5, where 5^m is the greatest power of 5 that divides n.

Original entry on oeis.org

1, 2, 3, 4, 1, 1, 2, 3, 4, 2, 1, 2, 3, 4, 3, 1, 2, 3, 4, 4, 1, 2, 3, 4, 1, 1, 2, 3, 4, 1, 1, 2, 3, 4, 2, 1, 2, 3, 4, 3, 1, 2, 3, 4, 4, 1, 2, 3, 4, 2, 1, 2, 3, 4, 1, 1, 2, 3, 4, 2, 1, 2, 3, 4, 3, 1, 2, 3, 4, 4, 1, 2, 3, 4, 3, 1, 2, 3, 4, 1, 1, 2, 3, 4, 2, 1
Offset: 1

Views

Author

Clark Kimberling, Oct 19 2016

Keywords

Comments

a(n) is the rightmost nonzero digit in the base 5 expansion of n (A007091).

Examples

			a(20) = (20/5 mod 5) = 4.
		

Crossrefs

Cf. A277550, A277551, A277555, A277548 (positions of 1, 2, 3 and 4 in this sequence).

Programs

  • Mathematica
    Table[Mod[n/5^IntegerExponent[n, 5], 5], {n, 1, 160}]
  • PARI
    a(n) = n/5^valuation(n, 5) % 5; \\ Michel Marcus, Oct 20 2016

Formula

a(n) = A132739(n) mod 5 = A010874(A132739(n)). - Michel Marcus, Oct 20 2016
Showing 1-10 of 18 results. Next