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-20 of 21 results. Next

A177334 Largest factor in the factorization of n! over distinct terms of A050376.

Original entry on oeis.org

2, 3, 4, 5, 16, 16, 16, 81, 256, 256, 256, 256, 256, 256, 256, 256, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 65536, 4294967296, 4294967296, 4294967296, 4294967296, 4294967296, 4294967296
Offset: 2

Views

Author

Vladimir Shevelev, May 06 2010

Keywords

Comments

Each number >=2 has a unique factorization over distinct terms of A050376.
This is obtained from the standard prime factor representation by splitting the exponents into a sum of powers of 2, and further factorization according to the nonzero term of this base-2 representation.
The largest factor of this representation of A000142(n) defines this sequence.

References

  • V. S. Shevelev, Multiplicative functions in the Fermi-Dirac arithmetic, Izvestia Vuzov of the North-Caucasus region, Nature sciences 4 (1996), 28-43 [Russian].

Crossrefs

Programs

  • Maple
    A177334 := proc(n) local a,p,pow2 ; a := 1 ; for p in ifactors(n!)[2] do pow2 := convert( op(2,p),base,2) ; for j from 1 to nops(pow2) do if op(j,pow2) <> 0 then a := max(a,op(1,p)^(2^(j-1))) ; end if; end do: end do: return a ; end proc:
    seq(A177334(n),n=2..60) ; # R. J. Mathar, Jun 16 2010
  • Mathematica
    b[n_] :=2^(-1+Position[ Reverse@IntegerDigits[n, 2],?(#==1&)])//Flatten; a[n] := Module[{np = PrimePi[n]}, v=Table[0,{np}]; Do[p = Prime[k]; Do[v[[k]] += IntegerExponent[j, p], {j,2,n}],  {k,1,np}]; Max[(Prime/@Range[np])^(b/@v) // Flatten]]; Array[a, 38, 2]  (* Amiram Eldar, Sep 17 2019 *)

Extensions

a(18) and a(19) corrected and sequence extended by R. J. Mathar, Jun 16 2010

A120385 If a(n-1) = 1 then largest value so far + 1, otherwise floor(a(n-1)/2); or table T(n,k) with T(n,0) = n, T(n,k+1) = floor(T(n,k)/2).

Original entry on oeis.org

1, 2, 1, 3, 1, 4, 2, 1, 5, 2, 1, 6, 3, 1, 7, 3, 1, 8, 4, 2, 1, 9, 4, 2, 1, 10, 5, 2, 1, 11, 5, 2, 1, 12, 6, 3, 1, 13, 6, 3, 1, 14, 7, 3, 1, 15, 7, 3, 1, 16, 8, 4, 2, 1, 17, 8, 4, 2, 1, 18, 9, 4, 2, 1, 19, 9, 4, 2, 1, 20, 10, 5, 2, 1, 21, 10, 5, 2, 1, 22, 11, 5, 2, 1, 23, 11, 5, 2, 1, 24, 12, 6, 3, 1, 25
Offset: 1

Views

Author

Keywords

Comments

Although not strictly a fractal sequence as defined in the Kimberling link, this sequence has many fractal properties. If the first instance of each value is removed, the result is the original sequence with each row repeated twice. Removing all odd-indexed instances of each value does give the original sequence.

Examples

			The table starts:
  1;
  2, 1;
  3, 1;
  4, 2, 1;
  5, 2, 1;
  6, 3, 1;
  7, 3, 1;
  8, 4, 2, 1;
		

Crossrefs

Cf. A029837 (row lengths), A083652 (position of first n).
Cf. A005187 (row sums). A001477, A050292, A080277.

Programs

  • Maple
    T:= proc(n) T(n):= `if`(n=1, 1, [n, T(iquo(n, 2))][]) end:
    seq(T(n), n=1..30);  # Alois P. Heinz, Feb 12 2019
  • Mathematica
    Flatten[Function[n,NestWhile[Append[#, Floor[Last[#]/2]] &, {n}, Last[#] != 1 &]][#] & /@ Range[50]] (* Birkas Gyorgy, Apr 14 2011 *)

Formula

T(n,k) = floor(n/2^(k-1)).
From Peter Bala, Feb 02 2013: (Start)
The n-th row polynomial R(n,t) = Sum_{k>=0} t^k*floor(n/2^k) and satisfies the recurrence equation R(n,t) = t*R(floor(n/2),t) + n, with R(1,t) = 1.
O.g.f. Sum_{n>=1} R(n,t)*x^n = 1/(1-x)*Sum_{n>=0} t^n*x^(2^n)/(1 - x^(2^n)).
Product_{n>=1} ( 1 + x^((t^n - 2^n)/(t-2)) ) = 1 + Sum_{n>=1} x^R(n,t) = 1 + x + x^(2 + t) + x^(3 + t) + x^(4 + 2*t + t^2) + .... For related sequences see A050292 (t = -1), A001477(t = 0), A005187 (t = 1) and A080277 (t = 2).
(End)

A176525 Fermi-Dirac semiprimes: products of two distinct terms of A050376.

Original entry on oeis.org

6, 8, 10, 12, 14, 15, 18, 20, 21, 22, 26, 27, 28, 32, 33, 34, 35, 36, 38, 39, 44, 45, 46, 48, 50, 51, 52, 55, 57, 58, 62, 63, 64, 65, 68, 69, 74, 75, 76, 77, 80, 82, 85, 86, 87, 91, 92, 93, 94, 95, 98, 99, 100, 106, 111, 112, 115, 116, 117, 118, 119, 122
Offset: 1

Views

Author

Vladimir Shevelev, Apr 19 2010, Apr 20 2010

Keywords

Comments

The sequence essentially differs from A000379 beginning with a(108)=212 (not 210). All squarefree terms of A001358 are in the sequence.

References

  • Vladimir S. Shevelev, Multiplicative functions in the Fermi-Dirac arithmetic, Izvestia Vuzov of the North-Caucasus region, Nature sciences, Vol. 4 (1996), pp. 28-43 [Russian].

Crossrefs

Programs

  • Mathematica
    Select[Range[120], Plus @@ DigitCount[Last /@ FactorInteger[#], 2, 1] == 2 &] (* Amiram Eldar, Nov 27 2020 *)

Formula

If a(n)=u*v, uA050376 "Fermi-Dirac primes", then A064380(a(n))=a(n)-u-v+1+Sum{i>=1}(-1)^(i-1)*floor(v/u^i).

Extensions

Effectively duplicate content (due to duplicate referenced sequence) removed by Peter Munn, Dec 19 2019

A197911 Representable by A001045 (Jacobsthal sequence). Complement of A003158.

Original entry on oeis.org

0, 1, 3, 4, 5, 6, 8, 9, 11, 12, 14, 15, 16, 17, 19, 20, 21, 22, 24, 25, 26, 27, 29, 30, 32, 33, 35, 36, 37, 38, 40, 41, 43, 44, 46, 47, 48, 49, 51, 52, 54, 55, 57, 58, 59, 60, 62, 63, 64, 65, 67, 68, 69, 70, 72, 73, 75, 76, 78, 79, 80, 81, 83, 84, 85, 86, 88
Offset: 0

Views

Author

Philippe Deléham, Oct 19 2011

Keywords

Comments

a(n) modulo 2 is the Prouhet-Thue-Morse sequence A010060.
The sequence of Jacobsthal numbers A001045 begins [1, 1, 3, 5, 11, 21, ...] with two occurrences of the term 1. Allowing for this, we find that the numbers representable as a sum of distinct Jacobsthal numbers form A050292. - Peter Bala, Feb 02 2013
Partial sums of A056832. - Reinhard Zumkeller, Jul 29 2014

Crossrefs

Programs

  • Haskell
    a197911 n = a197911_list !! n
    a197911_list = scanl (+) 0 a056832_list
    -- Reinhard Zumkeller, Jul 29 2014
    
  • Python
    def A197911(n): return n+sum((~(i+1)&i).bit_length()&1 for i in range(n)) # Chai Wah Wu, Jan 09 2023

Formula

a(n) = Sum_{k>=0} A030308(n,k)*A001045(k+2).

A068639 a(0) = 0, a(n) = a(n-1) + (-1)^p(n) for n >= 1, where p(n) = highest power of 2 dividing n.

Original entry on oeis.org

0, 1, 0, 1, 2, 3, 2, 3, 2, 3, 2, 3, 4, 5, 4, 5, 6, 7, 6, 7, 8, 9, 8, 9, 8, 9, 8, 9, 10, 11, 10, 11, 10, 11, 10, 11, 12, 13, 12, 13, 12, 13, 12, 13, 14, 15, 14, 15, 16, 17, 16, 17, 18, 19, 18, 19, 18, 19, 18, 19, 20, 21, 20, 21, 22, 23, 22, 23, 24, 25, 24, 25, 24, 25, 24, 25, 26, 27, 26
Offset: 0

Views

Author

N. J. A. Sloane, Oct 01 2003

Keywords

Crossrefs

Programs

  • Mathematica
    A068639[n_] := (n + 2*Total[(-1)^Range[0, Max[0, BitLength[n] - 1]]*Reverse[IntegerDigits[n, 2]]])/3;
    Array[A068639, 101, 0] (* or *)
    Join[{0}, Accumulate[(-1)^IntegerExponent[Range[100], 2]]] (* Paolo Xausa, Jun 05 2025 *)
  • PARI
    a(n)=if(n<1,0,ceil(n/2)-a(n-ceil(n/2)))

Formula

a(n) = (n+2*A065359(n))/3; a(n) is asymptotic to n/3. - Benoit Cloitre, Oct 04 2003
From Ralf Stephan, Oct 17 2003: (Start)
a(0)=0, a(2n) = -a(n) + n, a(2n+1) = -a(n) + n + 1.
a(n) = (1/2) * (A050292(n) + A065359(n)).
G.f.: (1/2) * 1/(1-x) * Sum_{k>=0} (-1)^k*t/(1-t^2) where t=x^2^k. (End)
a(0)=0 then a(n) = ceiling(n/2)-a(n-ceiling(n/2)). - Benoit Cloitre, May 03 2004

Extensions

More terms from John W. Layman and Robert G. Wilson v, Oct 02 2003

A123087 Sequence of numbers such that a(2*n) + a(n) = n and a(n) is the smallest number such that a(n) >= a(n-1).

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 24, 24, 25, 25, 25, 25, 26
Offset: 0

Views

Author

Philippe Deléham, Sep 27 2006

Keywords

Comments

If the value a(n) = m >= 1 is appearing for the first time, then n is of the form n = 2^k*s, where k,s are odd numbers. Therefore every m occurs 2 or 4 times consecutively. More exactly, if n+2 has the same form as n (i.e., 2^k*s with odd k,s), then a(n) = m occurs 2 times, otherwise, m occurs 4 times. - Vladimir Shevelev, Aug 25 2010
a(n) is the number of those numbers not exceeding n for which 2 is an infinitary divisor (for definition see comment at A037445). - Vladimir Shevelev, Feb 21 2011

Examples

			  a(2*0) + a(0) = 0 -----> a(0)  = 0
  a(1)  >= a(0) ---------> a(1)  = 0
  a(2*1) + a(1) = 1 -----> a(2)  = 1
  a(3)  >= a(2) ---------> a(3)  = 1
  a(2*2) + a(2) = 2 -----> a(4)  = 1
  a(5)  >= a(4) ---------> a(5)  = 1
  a(2*3) + a(3) = 3 -----> a(6)  = 2
  a(7)  >= a(6) ---------> a(7)  = 2
  a(2*4) + a(4) = 4 -----> a(8)  = 3
  a(9)  >= a(8) ---------> a(9)  = 3
  a(2*5) + a(5) = 5 -----> a(10) = 4
  a(11) >= a(10) --------> a(11) = 4
  a(2*6) + a(6) = 6 -----> a(12) = 4
  a(13) >= a(12) --------> a(13) = 4
  a(2*7) + a(7) = 7 -----> a(14) = 5
		

Crossrefs

Partial sums of A096268 and of A328979.

Programs

  • Haskell
    a123087 n = a123087_list !! n
    a123087_list = scanl (+) 0 a096268_list
    -- Reinhard Zumkeller, Jul 29 2014
  • PARI
    a(n)=if(n<1,0,floor(n/2)-a(floor(n/2))) \\ Benoit Cloitre, Sep 30 2006
    

Formula

a(0)=0, a(n) = floor(n/2) - a(floor(n/2)); partial sums of A096268; a(2n) = A050292(n); a(n) is asymptotic to n/3. - Benoit Cloitre, Sep 30 2006
a(2*n+1) = a(2*n); a(n) = n/3 + O(log(n)), moreover, the equation a(3m) = m has infinitely many solutions, e.g., a(3*2^k) = 2^k; on the other hand, a((4^k-1)/3) = (4^k-1)/9 - k/3, i.e., limsup|a(n) - n/3| = infinity. - Vladimir Shevelev, Aug 25 2010
a(n) = (n - A065359(n))/3. - Velin Yanev, Jul 13 2021
a(n) = n - A050292(n). - Max Alekseyev, Mar 05 2023

A076895 a(1) = 1, a(n) = n - a(ceiling(n/2)).

Original entry on oeis.org

1, 1, 2, 3, 3, 4, 4, 5, 6, 7, 7, 8, 9, 10, 10, 11, 11, 12, 12, 13, 14, 15, 15, 16, 16, 17, 17, 18, 19, 20, 20, 21, 22, 23, 23, 24, 25, 26, 26, 27, 27, 28, 28, 29, 30, 31, 31, 32, 33, 34, 34, 35, 36, 37, 37, 38, 38, 39, 39, 40, 41, 42, 42, 43, 43, 44, 44, 45, 46, 47, 47, 48, 48
Offset: 1

Views

Author

Benoit Cloitre, Nov 26 2002

Keywords

Crossrefs

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = n - a[Ceiling[n/2]]; Array[a, 100] (* Amiram Eldar, Sep 10 2020 *)
  • PARI
    a(n)=if(n<2,1,n-a(ceil(n/2)))

Formula

a(n) is asymptotic to (2/3)*n.
a(n) = A050292(n-1) + (1+(1-2*(C(n)-F(n)))*(-1)^F(n))/2 where C(n) = ceiling(log_2(n)); F(n) = floor(log_2(n)) and A050292(n) (with A050292(0)=0) is the maximum cardinality of a double-free subset of {1, 2, ..., n}. So using Wang's asymptotic formula for A050292, a(n) = (2/3)*n + O(log_4(n)). Series expansion: (1/(x-1)) * ( 1/(x-1) + Sum_{i>=1} (-1)^i*( x^(2^i)/(x^(2^i)-1) - x^(2^(i-1)) ) ). - Antonio G. Astudillo (afg_astudillo(AT)hotmail.com), Feb 17 2003
a(n+1) = b(n) with b(0)=0, b(2n) = -b(n) + 2n+1, b(2n+1) = -b(n) + 2n + 2 -[n==0]. Also a(n+1) = A050292(n) + A030301(n). - Ralf Stephan, Oct 28 2003

Extensions

Edited by Ralf Stephan, Sep 01 2004

A357378 Lexicographically earliest sequence of positive integers such that the values a(floor(n/2)) * a(n) are all distinct.

Original entry on oeis.org

1, 2, 2, 3, 4, 5, 1, 3, 3, 4, 1, 3, 7, 11, 6, 7, 8, 9, 5, 7, 13, 14, 10, 11, 5, 6, 2, 4, 6, 8, 7, 8, 4, 5, 5, 6, 5, 10, 9, 10, 2, 3, 6, 7, 6, 8, 5, 6, 13, 15, 12, 13, 17, 19, 13, 16, 15, 16, 11, 13, 11, 13, 14, 15, 17, 19, 17, 19, 20, 21, 17, 18, 22, 23, 13
Offset: 0

Views

Author

Rémy Sigrist, Sep 26 2022

Keywords

Comments

See A357379 for the corresponding products.
The sequence is well defined; we can always extend it with a value strictly greater than the square of the greatest value so far.
The sequence is unbounded (otherwise we could only have a finite number of products a(floor(n/2)) * a(n), and therefore a finite number of terms).
For any prime number p: the first term >= p is p.
All prime numbers appear in the sequence.
If a(n) is the first occurrence of some prime number p, then a(m) = 1 for some m in the interval floor(n/2)..2*n.
There are infinitely many 1's in the sequence; as a consequence, every positive integer appears in A357379.

Examples

			The first terms are:
  n   a(n)  a(floor(n/2))  a(floor(n/2))*a(n)
  --  ----  -------------  ------------------
   0     1              1                   1
   1     2              1                   2
   2     2              2                   4
   3     3              2                   6
   4     4              2                   8
   5     5              2                  10
   6     1              3                   3
   7     3              3                   9
   8     3              4                  12
   9     4              4                  16
  10     1              5                   5
  11     3              5                  15
  12     7              1                   7
		

Crossrefs

Cf. A050292 (additive variant), A357379.

Programs

  • C
    See Links section.
    
  • Python
    from itertools import count, islice
    def agen(): # generator of terms
        alst, disallowed = [1], {1}; yield 1
        for n in count(1):
            ahalf, k = alst[n//2], 1
            while ahalf*k in disallowed: k += 1
            an = k; yield an; alst.append(an); disallowed.add(ahalf*an)
    print(list(islice(agen(), 75))) # Michael S. Branicky, Sep 26 2022

Formula

a(2*n + 1) > a(2*n).

A076896 a(1) = 1, a(n) = n-a(floor(2n/3)).

Original entry on oeis.org

1, 1, 2, 3, 3, 3, 4, 5, 6, 7, 7, 7, 8, 8, 8, 9, 10, 11, 12, 12, 13, 14, 15, 15, 16, 16, 16, 17, 17, 18, 19, 19, 19, 20, 20, 21, 22, 22, 23, 24, 25, 25, 26, 27, 27, 28, 28, 29, 30, 31, 31, 32, 33, 33, 34, 34, 35, 36, 36, 36, 37, 37, 38, 39, 39, 39, 40, 41, 41, 42, 43, 43, 44, 44
Offset: 1

Views

Author

Benoit Cloitre, Nov 26 2002

Keywords

Crossrefs

Cf. A050292.

Programs

  • Mathematica
    a[1] = 1; a[n_] := a[n] = n - a[Floor[2*n/3]]; Array[a, 100] (* Amiram Eldar, May 09 2022 *)
  • PARI
    a(n)=if(n==0,0,n-a(floor(2*n/3))); \\ Joerg Arndt, Apr 27 2013

Formula

a(n) is asymptotic to (6/10)*n.

A335115 a(2*n) = 2*n - a(n), a(2*n+1) = 2*n + 1.

Original entry on oeis.org

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

Views

Author

Ilya Gutkovskiy, May 23 2020

Keywords

Crossrefs

Programs

  • Mathematica
    a[n_] := a[n] = If[EvenQ[n], n - a[n/2], n]; Table[a[n], {n, 1, 75}]
    nmax = 75; CoefficientList[Series[Sum[(-1)^k x^(2^k)/(1 - x^(2^k))^2, {k, 0, Floor[Log[2, nmax]]}], {x, 0, nmax}], x] // Rest
    f[p_, e_] := If[p == 2, (2^(e + 1) + (-1)^e)/3, p^e]; a[1] = 1; a[n_] := Times @@ (f @@@ FactorInteger[n]); Array[a, 100] (* Amiram Eldar, Dec 02 2020 *)
  • PARI
    a(n) = my(k=valuation(n,2)); (n<<1 + (n>>k)*(-1)^k)/3; \\ Kevin Ryde, Oct 06 2020

Formula

G.f.: Sum_{k>=0} (-1)^k * x^(2^k) / (1 - x^(2^k))^2.
G.f. A(x) satisfies: A(x) = x / (1 - x)^2 - A(x^2).
Dirichlet g.f.: zeta(s-1) / (1 + 2^(-s)).
a(n) = Sum_{d|n} A154269(n/d) * d.
Sum_{k=1..n} a(k) ~ 2*n^2/5. - Vaclav Kotesovec, Jun 11 2020
Multiplicative with a(2^e) = A001045(e+1) and a(p^e) = p^e for e >= 0 and prime p > 2. - Werner Schulte, Oct 05 2020
Previous Showing 11-20 of 21 results. Next