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 14 results. Next

A264994 Bijective base-4 reverse: a(0) = 0; for n >= 1, a(n) = A030103(A065883(n)) * A234957(n).

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 9, 13, 8, 6, 10, 14, 12, 7, 11, 15, 16, 17, 33, 49, 20, 21, 37, 53, 36, 25, 41, 57, 52, 29, 45, 61, 32, 18, 34, 50, 24, 22, 38, 54, 40, 26, 42, 58, 56, 30, 46, 62, 48, 19, 35, 51, 28, 23, 39, 55, 44, 27, 43, 59, 60, 31, 47, 63, 64, 65, 129, 193, 68, 81, 145, 209, 132, 97, 161, 225, 196, 113, 177, 241, 80, 69
Offset: 0

Views

Author

Antti Karttunen, Dec 07 2015

Keywords

Comments

Self-inverse permutation of nonnegative integers.

Crossrefs

Cf. A264993 (a(3n)/3), A265335 (a(5n)/5).
Cf. also A057889 (base-2), A263273 (base-3), A264995 (base-5), A264979 (base-9).

Programs

Formula

a(0) = 0; for n >= 1, a(n) = A030103(A065883(n)) * A234957(n).
Other identities. For all n >= 0:
a(4*n) = 4*a(n).

A242954 a(n) = Product_{i=1..n} A234957(i).

Original entry on oeis.org

1, 1, 1, 1, 4, 4, 4, 4, 16, 16, 16, 16, 64, 64, 64, 64, 1024, 1024, 1024, 1024, 4096, 4096, 4096, 4096, 16384, 16384, 16384, 16384, 65536, 65536, 65536, 65536, 1048576, 1048576, 1048576, 1048576, 4194304, 4194304, 4194304, 4194304, 16777216, 16777216, 16777216
Offset: 0

Views

Author

Tom Edgar, May 27 2014

Keywords

Comments

This is the generalized factorial for A234957.
a(0) = 1 as it represents the empty product.

Crossrefs

Programs

  • Sage
    S=[0]+[4^valuation(i,4) for i in [1..100]]
    [prod(S[1:i+1]) for i in [0..99]]

Formula

a(n) = Product_{i=1..n} A234957(i).
a(n) = 4^(A054893(n)). - Vaclav Kotesovec, May 28 2014

A235127 Greatest k such that 4^k divides n.

Original entry on oeis.org

0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 1, 0, 0, 0, 1
Offset: 1

Views

Author

Tom Edgar, Jan 03 2014

Keywords

Examples

			Since 4^2 divides 32 and 4^3 does not, we have a(32) = 2. Likewise, since no positive power of 4 divides 9, a(9) = 0.
		

Crossrefs

Programs

  • Mathematica
    IntegerExponent[Range@ 105, 4] (* Michael De Vlieger, Nov 18 2017 *)
  • PARI
    A235127(n) = valuation(n,4); \\ Antti Karttunen, Nov 18 2017
    
  • Python
    def A235127(n): return (~n&n-1).bit_length()>>1 # Chai Wah Wu, Jul 08 2022
  • Sage
    n=100 #change n for more terms
    [valuation(i,4) for i in [1..n]]
    

Formula

a(n) = valuation(n,4).
G.f.: Sum_{k>=1} x^(4^k)/(1 - x^(4^k)). - Ilya Gutkovskiy, Jan 28 2017
a(n) = A004526(A007814(n)). - Antti Karttunen, Nov 18 2017
Asymptotic mean: lim_{m->oo} (1/m) * Sum_{k=1..m} a(k) = 1/3. - Amiram Eldar, Jan 17 2022

Extensions

More terms from Antti Karttunen, Nov 18 2017

A056832 All a(n) = 1 or 2; a(1) = 1; get next 2^k terms by repeating first 2^k terms and changing last element so sum of first 2^(k+1) terms is odd.

Original entry on oeis.org

1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1, 2, 1, 1, 1, 2, 1, 2, 1
Offset: 1

Views

Author

Jonas Wallgren, Aug 30 2000

Keywords

Comments

Dekking (2016) calls this the Toeplitz sequence or period-doubling sequence. - N. J. A. Sloane, Nov 08 2016
Fixed point of the morphism 1->12 and 2->11 (1 -> 12 -> 1211 -> 12111212 -> ...). - Benoit Cloitre, May 31 2004
a(n) is multiplicative. - Christian G. Bower, Jun 03 2005
a(n) is the least k such that A010060(n-1+k) = 1 - A010060(n-1); the sequence {a(n+1)-1} is the characteristic sequence for A079523. - Vladimir Shevelev, Jun 22 2009
The squarefree part of the even part of n. - Peter Munn, Dec 03 2020

Examples

			1 -> 1,2 -> 1,2,1,1 -> 1,2,1,1,1,2,1,2 -> 1,2,1,1,1,2,1,2,1,2,1,1,1,2,1,1.
Here we have 1 element, then 2 elements, then 4, 8, 16, etc.
		

References

  • Manfred R. Schroeder, Fractals, Chaos, Power Laws, W. H. Freeman, NY, 1991; pp. 277-279.

Crossrefs

Cf. A197911 (partial sums).
Essentially same as first differences of Thue-Morse, A010060. - N. J. A. Sloane, Jul 02 2015
See A035263 for an equivalent version.
Limit of A317956(n) for large n.
Row/column 2 of A059895.
Positions of 1s: A003159.
Positions of 2s: A036554.
A002425, A006519, A079523, A096268, A214682, A234957 are used in a formula defining this sequence.
A059897 is used to express relationship between terms of this sequence.

Programs

  • Haskell
    a056832 n = a056832_list !! (n-1)
    a056832_list = 1 : f [1] where
       f xs = y : f (y : xs) where
              y = 1 + sum (zipWith (*) xs $ reverse xs) `mod` 2
    -- Reinhard Zumkeller, Jul 29 2014
    
  • Mathematica
    Nest[ Function[l, {Flatten[(l /. {1 -> {1, 2}, 2 -> {1, 1}})]}], {1}, 7] (* Robert G. Wilson v, Mar 03 2005 *)
    Table[Mod[-(-1)^(n + 1) (-1)^n Numerator[EulerE[2 n + 1, 1]], 3] , {n, 0, 120}] (* Michael De Vlieger, Aug 15 2016, after Jean-François Alcover at A002425 *)
  • PARI
    a(n)=numerator(2/n*(4^n-1)*bernfrac(2*n))%3
    
  • PARI
    a(n)=if(n<1, 0, valuation(n,2)%2+1) /* Michael Somos, Jun 18 2005 */
    
  • Python
    def A056832(n): return 1+((~n&n-1).bit_length()&1) # Chai Wah Wu, Jan 09 2023

Formula

a(n) = ((-1)^(n+1)*A002425(n)) modulo 3. - Benoit Cloitre, Dec 30 2003
a(1)=1, a(n) = 1 + ((Sum_{i=1..n-1} a(i)*a(n-i)) mod 2). - Benoit Cloitre, Mar 16 2004
a(n) is multiplicative with a(2^e) = 1 + (1-(-1)^e)/2, a(p^e)=1 if p > 2. - Michael Somos, Jun 18 2005
[a(2^n+1) .. a(2^(n+1)-1)] = [a(1) .. a(2^n-1)]; a(2^(n+1)) = 3 - a(2^n).
For n > 0, a(n) = 2 - A035263(n). - Benoit Cloitre, Nov 24 2002
a(n)=2 if n-1 is in A079523; a(n)=1 otherwise. - Vladimir Shevelev, Jun 22 2009
a(n) = A096268(n-1) + 1. - Reinhard Zumkeller, Jul 29 2014
From Peter Munn, Dec 03 2020: (Start)
a(n) = A007913(A006519(n)) = A006519(n)/A234957(n).
a(n) = A059895(n, 2) = n/A214682(n).
a(n*k) = (a(n) * a(k)) mod 3.
a(A059897(n, k)) = A059897(a(n), a(k)).
(End)
Asymptotic mean: lim_{m->oo} (1/m) * Sum__{k=1..m} a(k) = 4/3. - Amiram Eldar, Mar 09 2021

A327939 Multiplicative with a(p^e) = p^(e-(e mod p)).

Original entry on oeis.org

1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 16, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 27, 4, 1, 1, 1, 16, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 16, 1, 1, 1, 4, 1, 27, 1, 4, 1, 1, 1, 4, 1, 1, 1, 64, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 16, 27, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 16, 1, 1, 1, 4, 1, 1, 1, 4, 1, 1, 1, 108, 1, 1, 1, 16
Offset: 1

Views

Author

Antti Karttunen, Oct 01 2019

Keywords

Comments

Fixed points of the map x -> gcd(x, A003415(x)), i.e., if we start iterating with A085731 from any x = n (>= 1), we will eventually reach a(n), after which the result does not change anymore. This was found by LODA miner (see C. Krause link), and is easily seen to be true by Eric M. Schmidt's multiplicative formula for A085731. Note also that this sequence is idempotent, meaning a(a(n)) = a(n) for all n. - Antti Karttunen, Apr 05 2021
The largest divisor of n that is a term of A072873. - Amiram Eldar, Sep 14 2023

Crossrefs

Differs from A234957 for the first time at n=27.

Programs

  • Mathematica
    f[p_, e_] := p^(e - Mod[e, p]); a[1] = 1; a[n_] := Times @@ f @@@ FactorInteger[n]; Array[a, 100] (* Amiram Eldar, Sep 14 2023 *)
  • PARI
    A327939(n) = { my(f = factor(n)); for(k=1, #f~, f[k,2] = (f[k,2]-(f[k,2]%f[k,1]))); factorback(f); };

Formula

Multiplicative with a(p^e) = p^(e-(e mod p)).
a(n) = n / A327938(n).

A234959 Highest power of 6 dividing n.

Original entry on oeis.org

1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 36, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 36, 1, 1, 1, 1, 1, 6, 1, 1, 1, 1, 1, 6
Offset: 1

Views

Author

Tom Edgar, Jan 01 2014

Keywords

Comments

The generalized binomial coefficients produced by this sequence provide an analog to Kummer's Theorem using arithmetic in base 6.

Examples

			Since 12 = 6 * 2, a(12) = 6. Likewise, since 6 does not divide 13, a(13) = 1.
		

Crossrefs

Programs

  • Haskell
    a234959 = f 1 where
       f y x = if m == 0 then f (y * 6) x' else y  where (x', m) = divMod x 6
    -- Reinhard Zumkeller, Feb 09 2015
    
  • Mathematica
    6^Table[IntegerExponent[n, 6], {n, 84}] (* Alonso del Arte, Jan 01 2014 *)
  • PARI
    a(n)=6^valuation(n,6) \\ Charles R Greathouse IV, Aug 05 2015
  • Sage
    n=200 #change n for more terms
    [6^(valuation(i,6)) for i in [1..n]]
    

Formula

a(n) = 6^(valuation(n,6)).
a(n) = 6^A122841(n). - Joerg Arndt, Jan 02 2014
G.f.: x/(1 - x) + 5 * Sum_{k>=1} 6^(k-1)*x^(6^k)/(1 - x^(6^k)). - Ilya Gutkovskiy, Jul 10 2019

A268354 Highest power of 7 dividing n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 49, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 7, 1, 1, 1, 1, 1, 1, 49, 1, 1, 1, 1, 1, 1, 7
Offset: 1

Views

Author

Tom Edgar, Feb 02 2016

Keywords

Comments

The generalized binomial coefficients produced by this sequence provide an analog to Kummer's Theorem using arithmetic in base 7.

Examples

			Since 14 = 7 * 2, a(14) = 7. Likewise, since 7 does not divide 13, a(13) = 1.
		

Crossrefs

Programs

  • Magma
    [7^Valuation(n,7): n in [1..150]]; // Vincenzo Librandi, Feb 03 2016
    
  • Mathematica
    7^Table[IntegerExponent[n, 7], {n, 150}] (* Vincenzo Librandi, Feb 03 2016 *)
  • PARI
    a(n) = 7^valuation(n, 7) \\ Michel Marcus, Feb 05 2016
  • Sage
    [7^valuation(i, 7) for i in [1..100]]
    

Formula

a(n) = 7^valuation(n,7).
a(n) = 7^A214411(n).
Completely multiplicative with a(7) = 7, a(p) = 1 for prime p and p <> 7. - Andrew Howroyd, Jul 20 2018
From Peter Bala, Feb 21 2019: (Start)
a(n) = gcd(n,7^n).
a(n) = n/A242603(n).
O.g.f.: x/(1 - x) + 6*Sum_{n >= 1} 7^(n-1)*x^(7^n)/ (1 - x^(7^n)). (End)
Sum_{k=1..n} a(k) ~ (6/(7*log(7)))*n*log(n) + (4/7 + 6*(gamma-1)/(7*log(7)))*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 15 2022
Dirichlet g.f.: zeta(s)*(7^s-1)/(7^s-7). - Amiram Eldar, Jan 03 2023

Extensions

More terms from Antti Karttunen, Dec 22 2017

A268357 Highest power of 11 dividing n.

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 11, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 121, 1
Offset: 1

Views

Author

Tom Edgar, Feb 02 2016

Keywords

Comments

The generalized binomial coefficients produced by this sequence provide an analog to Kummer's Theorem using arithmetic in base 11.
This first index where this differs from A109014 is 121; a(121) = 121 and A109014(121) = 11.

Examples

			Since 22 = 11 * 2, a(22) = 11. Likewise, since 11 does not divide 21, a(21) = 1.
		

Crossrefs

Programs

  • Magma
    [11^Valuation(n,11): n in [1..130]]; // Vincenzo Librandi, Feb 03 2016
  • Mathematica
    Table[11^IntegerExponent[n, 11], {n, 130}] (* Bruno Berselli, Feb 03 2016 *)
  • Sage
    [11^valuation(i, 11) for i in [1..130]]
    

Formula

a(n) = 11^valuation(n,11).
Completely multiplicative with a(11) = 11, a(p) = 1 for prime p and p<>11. - Andrew Howroyd, Jul 20 2018
From Peter Bala, Feb 21 2019: (Start)
a(n) = gcd(n,11^n).
O.g.f.: x/(1 - x) + 10*Sum_{n >= 1} 11^(n-1)*x^(11^n)/ (1 - x^(11^n)). (End)
Sum_{k=1..n} a(k) ~ (10/(11*log(11)))*n*log(n) + (6/11 + 10*(gamma-1)/(11*log(11)))*n, where gamma is Euler's constant (A001620). - Amiram Eldar, Nov 15 2022
Dirichlet g.f.: zeta(s)*(11^s-1)/(11^s-11). - Amiram Eldar, Jan 03 2023

A339245 Partrich numbers: positive integers whose square part and squarefree part are divisible by 2 and an odd prime.

Original entry on oeis.org

216, 360, 504, 600, 792, 864, 936, 1000, 1080, 1176, 1224, 1368, 1400, 1440, 1512, 1656, 1944, 1960, 2016, 2088, 2200, 2232, 2376, 2400, 2520, 2600, 2664, 2744, 2808, 2904, 2952, 3000, 3096, 3168, 3240, 3384, 3400, 3456, 3672, 3744, 3800, 3816, 3960, 4000, 4056, 4104, 4200
Offset: 1

Views

Author

Peter Munn, Nov 28 2020

Keywords

Comments

Not named after anyone, partrich numbers have the square part of their odd part, the square part of their even part (A234957), the squarefree part of their odd part and the squarefree part of their even part (A056832) all greater than 1.
Numbers whose odd part and even part are nonsquare and nonsquarefree.
All terms are divisible by 8. If m is present, 2m is absent and 4m is present.
Closed under multiplication by any square and under application of A059896: for n, k >= 1, A059896(a(n), k) is in the sequence.
From Peter Munn, Apr 07 2021: (Start)
The first deficient partrich number is 39304 = 2^3 * 17^3. (ascertained by Amiram Eldar)
The first 7 terms generate Carmichael numbers using the method of Erdős described in A287840.
(End)

Examples

			A positive integer is present if and only if it factorizes as 2 times an odd squarefree number > 1, an even square that is a power of 4 and an odd square > 1. This factorization of the initial terms is shown below.
   n  a(n)
   1   216 = 2 *  3 *  4 *  9,
   2   360 = 2 *  5 *  4 *  9,
   3   504 = 2 *  7 *  4 *  9,
   4   600 = 2 *  3 *  4 * 25,
   5   792 = 2 * 11 *  4 *  9,
   6   864 = 2 *  3 * 16 *  9,
   7   936 = 2 * 13 *  4 *  9,
   8  1000 = 2 *  5 *  4 * 25,
   9  1080 = 2 * 15 *  4 *  9,
  10  1176 = 2 *  3 *  4 * 49,
  ...
		

Crossrefs

Subsequences: A017139, A017643.

Programs

  • Mathematica
    q[n_] := Module[{ie = IntegerExponent[n, 2], odd}, ie > 2 && OddQ[ie] && !SquareFreeQ[(odd = n/2^ie)] && !IntegerQ @ Sqrt[odd]]; Select[Range[4200], q] (* Amiram Eldar, Dec 04 2020 *)

Formula

A008586 INTERSECT A028983 INTERSECT A036554 INTERSECT A038838.
Asymptotic density is 1/12 - 2/(3 * Pi^2) = 0.01578587757... . (Formula due to Amiram Eldar.)

A254609 Triangle read by rows: T(n,k) = A243757(n)/(A243757(k)*A243757(n-k)).

Original entry on oeis.org

1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 1, 1, 1, 5, 5, 5, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 1, 1, 1, 1, 5, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 5, 5, 5, 5, 1, 5, 5, 5, 5, 1, 1, 1, 5, 5, 5, 1, 1, 5, 5, 5, 1, 1, 1, 1, 1, 5, 5, 1, 1, 1, 5, 5
Offset: 0

Views

Author

Tom Edgar, Feb 02 2015

Keywords

Comments

These are the generalized binomial coefficients associated with A060904.
The exponent of T(n,k) is the number of 'carries' that occur when adding k and n-k in base 5 using the traditional addition algorithm.
If T(n,k) != 0 mod 5, then n dominates k in base 5.
A194459(n) = number of ones in row n. - Reinhard Zumkeller, Feb 04 2015

Examples

			The first five terms in A060904 are 1, 1, 1, 1, and 5 and so T(4,2) = 1*1*1*1/((1*1)*(1*1))=1 and T(5,3) = 5*1*1*1*1/((1*1*1)*(1*1))=5.
The triangle begins:
1
1, 1
1, 1, 1
1, 1, 1, 1
1, 1, 1, 1, 1
1, 5, 5, 5, 5, 1
1, 1, 5, 5, 5, 1, 1
1, 1, 1, 5, 5, 1, 1, 1
1, 1, 1, 1, 5, 1, 1, 1, 1
1, 1, 1, 1, 1, 1, 1, 1, 1, 1
1, 5, 5, 5, 5, 1, 5, 5, 5, 5, 1
1, 1, 5, 5, 5, 1, 1, 5, 5, 5, 1, 1
1, 1, 1, 5, 5, 1, 1, 1, 5, 5, 1, 1, 1
1, 1, 1, 1, 5, 1, 1, 1, 1, 5, 1, 1, 1, 1
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
		

Crossrefs

Programs

  • Haskell
    import Data.List (inits)
    a254609 n k = a254609_tabl !! n !! k
    a254609_row n = a254609_tabl !! n
    a254609_tabl = zipWith (map . div)
       a243757_list $ zipWith (zipWith (*)) xss $ map reverse xss
       where xss = tail $ inits a243757_list
    -- Reinhard Zumkeller, Feb 04 2015

Formula

T(n,k) = A243757(n)/(A243757(k)*A243757(n-k)).
T(n,k) = Product_{i=1..n} A060904(i)/(Product_{i=1..k} A060904(i)*Product_{i=1..n-k} A060904(i)).
T(n,k) = A060904(n)/n*(k/A060904(k)*T(n-1,k-1)+(n-k)/A060904(n-k)*T(n-1,k)).
Showing 1-10 of 14 results. Next