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

A226898 Hooley's Delta function: maximum number of divisors of n in [u, eu] for all u. (Here e is Euler's number 2.718... = A001113.)

Original entry on oeis.org

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

Views

Author

Keywords

Comments

This function measures the tendency of divisors of a number to cluster.
Tenenbaum (1985) proves that a(1) + ... + a(n) < n exp(c sqrt(log log n log log log n)) for some constant c > 0 and all n > 16. In particular, the average order of a(n) is O((log n)^k) for any k > 0.
Maier & Tenenbaum show that (log log n)^(g + o(1)) < a(n) < (log log n)^(log 2 + o(1)) for almost all n, with g = log 2/log((1-1/log 27)/(1-1/log 3)) = 0.338....
For generalizations, see de la Bretèche & Tenenbaum, Brüdern, Hall & Tenenbaum, and Caballero.

Examples

			The divisors of 24 are 1, 2, 3, 4, 6, 8, 12, 24. For u = 3, {3, 4, 6, 8} are in [3, 3e] = [3, 8.15...] and thus a(24) = 4.
		

References

  • R. R. Hall and G. Tenenbaum, On the average and normal orders of Hooley's ∆-function, J. London Math. Soc. (2), Vol. 25, No. 3 (1982), pp. 392-406.
  • R. R. Hall and G. Tenenbaum, Divisors. Cambridge Tracts in Mathematics, 90. Cambridge University Press, Cambridge, 1988.

Crossrefs

Partial sums are A226901. Cf. A226899, A226900, A027750, A022843.

Programs

  • Haskell
    a226898 = maximum . map length .
       map (\ds@(d:_) -> takeWhile (<= e' d) ds) . init . tails . a027750_row
       where e' = floor . (* e) . fromIntegral; e = exp 1
    -- Reinhard Zumkeller, Jul 06 2013
    
  • Maple
    with(numtheory):
    a:= n-> (l-> max(seq(nops(select(x-> is(x<=exp(1)*l[i]), l))-i+1,
            i=1..nops(l))))(sort([divisors(n)[]])):
    seq(a(n), n=1..100);  # Alois P. Heinz, Jun 21 2013
  • Mathematica
    a[n_] := Module[{d = Divisors[n], m = 1}, For[i = 1, i < Length[d], i++, t = E*d[[i]]; m = Max[ Sum[ Boole[d[[j]] < t], {j, i, Length[d]}], m]]; m]; Table[a[n], {n, 1, 100}] (* Jean-François Alcover, Oct 08 2013, after Pari *)
  • PARI
    a(n)=my(d=divisors(n),m=1);for(i=1,#d-1, my(t=exp(1)*d[i]); m=max(sum(j=i,#d,d[j]
    				
  • PARI
    a(n)=my(d=divisors(n),r,t); for(i=1,#d\2, t=setsearch(d, d[i]*exp(1)\1,1); t=if(t, t-i, setsearch(d,d[i]*exp(1)\1)+1-i); if(t>r, r=t)); r \\ Charles R Greathouse IV, Mar 01 2018
    
  • Python
    from sympy import divisors, exp
    def a(n):
        d = divisors(n)
        m = 1
        for i in range(len(d) - 1):
            t = exp(1)*d[i]
            m = max(sum(1 for j in range(i, len(d)) if d[j]Indranil Ghosh, Jul 19 2017

Formula

a(mn) <= d(m)a(n) where d(n) is A000005.
The average order is between log log x and (log log x)^(11/4); the lower bound is due to Hall & Tenenbaum (1988) and the upper bound to Koukoulopoulos & Tao. - Charles R Greathouse IV, Jun 26 2023

A023123 Signature sequence of e (arrange the numbers i+j*x (i,j >= 1) in increasing order; the sequence of i's is the signature of x).

Original entry on oeis.org

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

Views

Author

Keywords

Comments

If one deletes the first occurrence of 1, the first occurrence of 2, the first occurrence of 3, etc., then the sequence is unchanged. - Brady J. Garvin, Sep 11 2024
Any signature sequence A is closely related to the partial sums of the corresponding homogeneous Beatty sequence: Let Q(d) = d + the sum from g=0 to g=d-1 of floor(theta * g) and Qinv(i) = the maximum integer d such that Q(d) <= i. If there is some d for which Q(d) = i, then A_i = 1. Otherwise, A_i = A_{i - Qinv(i)} + 1. - Brady J. Garvin, Sep 13 2024

References

  • Clark Kimberling, "Fractal Sequences and Interspersions", Ars Combinatoria, vol. 45 p 157 1997.

Crossrefs

Programs

  • Mathematica
    Quiet[Block[{$ContextPath}, Needs["Combinatorica`"]], {General::compat}]
    theta = E;
    sums = {0};
    cached = <||>;
    A023123[i_] := Module[{term, path, base},
      While[sums[[-1]] < i,
        term = sums[[-1]] + Floor[theta * (Length[sums] - 1)] + 1;
        AppendTo[sums, term];
        cached[term] = 1
      ];
      path = {i};
      While[Not[KeyExistsQ[cached, path[[-1]]]],
        AppendTo[path, path[[-1]] - Combinatorica`BinarySearch[sums, path[[-1]]] + 3/2];
      ];
      base = cached[path[[-1]]];
      MapIndexed[(cached[#1] = base + Length[path] - First[#2]) &, path];
      cached[i]
    ];
    Print[Table[A023123[i], {i, 1, 100}]]; (* Brady J. Garvin, Sep 13 2024 *)
  • Python
    from bisect import bisect
    from sympy import floor, E
    theta = E
    sums = [0]
    cached = {}
    def A023123(i):
        while sums[-1] < i:
            term = sums[-1] + floor(theta * (len(sums) - 1)) + 1
            sums.append(term)
            cached[term] = 1
        path = [i]
        while path[-1] not in cached:
            path.append(path[-1] - bisect(sums, path[-1]) + 1)
        base = cached[path[-1]]
        for offset, vertex in enumerate(reversed(path)):
            cached[vertex] = base + offset
        return cached[i]
    print([A023123(i) for i in range(1, 1001)])  # Brady J. Garvin, Sep 13 2024

Extensions

The a(47) term was missing. Corrected by T. D. Noe, Aug 12 2008

A184855 Numbers m such that prime(m) is of the form (k*e); complement of A184858.

Original entry on oeis.org

1, 3, 6, 8, 10, 14, 17, 19, 21, 24, 25, 27, 31, 35, 37, 38, 40, 41, 51, 52, 53, 56, 57, 58, 59, 62, 63, 67, 68, 69, 71, 76, 82, 86, 91, 98, 102, 107, 113, 114, 116, 126, 127, 130, 131, 135, 136, 143, 145, 146, 147, 153, 155, 158, 159, 163, 168, 170, 171, 176, 177, 181, 185, 186, 187, 192, 193, 195, 196, 197, 199, 200, 202, 206, 208, 210, 214, 216, 218, 219, 222, 225, 226, 230, 232, 234, 237, 240, 243, 244, 248, 249, 252, 254
Offset: 1

Views

Author

Clark Kimberling, Jan 23 2011

Keywords

Examples

			See A077545.
		

Crossrefs

Programs

  • Mathematica
    r=E; s=r/(r-1);
    a[n_]:=Floor [n*r];
    b[n_]:=Floor [n*s];
    Table[a[n], {n, 1, 120}]  (* A022843 *)
    t1={}; Do[If[PrimeQ[a[n]], AppendTo[t1, a[n]]], {n, 1, 600}]; t1
    t2={}; Do[If[PrimeQ[a[n]], AppendTo[t2, n]], {n, 1, 600}]; t2
    t3={}; Do[If[MemberQ[t1, Prime[n]], AppendTo[t3, n]], {n, 1, 300}]; t3
    t4={}; Do[If[PrimeQ[b[n]], AppendTo[t4, b[n]]], {n, 1, 600}]; t4
    t5={}; Do[If[PrimeQ[b[n]], AppendTo[t5, n]], {n, 1, 600}]; t5
    t6={}; Do[If[MemberQ[t4, Prime[n]], AppendTo[t6, n]], {n, 1, 300}]; t6
    (* List t1 matches A077545; list t2 matches A062409;
    lists t3-t6 match A184855-A184858. *)

A276853 Beatty sequence for 2*e.

Original entry on oeis.org

0, 5, 10, 16, 21, 27, 32, 38, 43, 48, 54, 59, 65, 70, 76, 81, 86, 92, 97, 103, 108, 114, 119, 125, 130, 135, 141, 146, 152, 157, 163, 168, 173, 179, 184, 190, 195, 201, 206, 212, 217, 222, 228, 233, 239, 244, 250, 255, 260, 266, 271, 277, 282, 288, 293, 299
Offset: 0

Views

Author

Clark Kimberling, Sep 24 2016

Keywords

Comments

A bisection of A022843.

Crossrefs

Programs

  • Mathematica
    z = 500; r = 2 E; b = Table[Floor[k*r], {k, 0, z}] (* A276853 *)

Formula

a(n) = floor(2*e*n).

A276860 First differences of the Beatty sequence A276853 for 2*e.

Original entry on oeis.org

5, 5, 6, 5, 6, 5, 6, 5, 5, 6, 5, 6, 5, 6, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 5, 6, 5, 6, 5, 6, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 5, 6, 5, 6, 5, 6, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 5, 6, 5, 6, 5, 6, 5, 5, 6, 5, 6, 5, 6, 5, 5, 6, 5, 6, 5, 6, 5, 6, 5, 5, 6, 5, 6, 5, 6, 5
Offset: 1

Views

Author

Clark Kimberling, Sep 24 2016

Keywords

Crossrefs

Programs

  • Mathematica
    z = 500; r = 2*E; b = Table[Floor[k*r], {k, 0, z}]; (* A276853 *)
    Differences[b] (* A276860 *)

Formula

a(n) = floor(n*r) - floor(n*r - r), where r = 2e, n >= 1.

A062409 Numbers k such that floor(e*k) is prime.

Original entry on oeis.org

1, 2, 5, 7, 11, 16, 22, 25, 27, 33, 36, 38, 47, 55, 58, 60, 64, 66, 86, 88, 89, 97, 99, 100, 102, 108, 113, 122, 124, 128, 130, 141, 155, 163, 172, 192, 205, 216, 227, 228, 236, 258, 261, 270, 272, 280, 283, 303, 305, 309, 314, 325, 334, 342, 345, 356, 367, 373
Offset: 1

Views

Author

Jason Earls, Jul 08 2001

Keywords

Crossrefs

Programs

  • Mathematica
    Select[Range[400],PrimeQ[Floor[E #]]&] (* Harvey P. Dale, Feb 12 2015 *)
  • PARI
    je=[]; for(n=0,1000, if(isprime(floor(exp(1)*n)),je=concat(je,n),)); je
    
  • PARI
    { default(realprecision, 50); n=0; e=exp(1); for (m=1, 10^5, if (isprime(floor(e*m)), write("b062409.txt", n++, " ", m); if (n==1000, break)) ) } \\ Harry J. Smith, Aug 07 2009

A108599 Self-inverse integer permutation induced by Beatty sequences for e and e/(e-1).

Original entry on oeis.org

2, 1, 5, 8, 3, 10, 13, 4, 16, 6, 19, 21, 7, 24, 27, 9, 29, 32, 11, 35, 12, 38, 40, 14, 43, 46, 15, 48, 17, 51, 54, 18, 57, 59, 20, 62, 65, 22, 67, 23, 70, 73, 25, 76, 78, 26, 81, 28, 84, 86, 30, 89, 92, 31, 95, 97, 33, 100, 34, 103, 106, 36, 108, 111, 37, 114, 39, 116, 119, 41
Offset: 1

Views

Author

Reinhard Zumkeller, Jun 11 2005

Keywords

Crossrefs

Cf. A108591.

Formula

a(A022843(n))=A054385(n) and a(A054385(n))=A022843(n).

A276875 Sums-complement of the Beatty sequence for e.

Original entry on oeis.org

1, 4, 7, 12, 15, 18, 23, 26, 31, 34, 37, 42, 45, 50, 53, 56, 61, 64, 69, 72, 75, 80, 83, 88, 91, 94, 99, 102, 105, 110, 113, 118, 121, 124, 129, 132, 137, 140, 143, 148, 151, 156, 159, 162, 167, 170, 175, 178, 181, 186, 189, 194, 197, 200, 205, 208, 211, 216
Offset: 1

Views

Author

Clark Kimberling, Sep 27 2016

Keywords

Comments

See A276871 for a definition of sums-complement and guide to related sequences.

Examples

			The Beatty sequence for e is A022843 = (0,2,5,8,10,13,16,...), with difference sequence s = A276859 = (2,3,3,2,3,3,3,2,3,3,2,3,3,3,2,...).  The sums s(j)+s(j+1)+...+s(k) include (2,3,5,6,8,9,10,12,13,...), with complement (1,4,7,12,15,...).
		

Crossrefs

Programs

  • Mathematica
    z = 500; r = E; b = Table[Floor[k*r], {k, 0, z}]; (* A022843 *)
    t = Differences[b]; (* A276859 *)
    c[k_, n_] := Sum[t[[i]], {i, n, n + k - 1}];
    u[k_] := Union[Table[c[k, n], {n, 1, z - k + 1}]];
    w = Flatten[Table[u[k], {k, 1, z}]]; Complement[Range[Max[w]], w]  (* A276875 *)

A247964 Beatty sequence for e^(1/3): a(n) = floor(n*(e^(1/3))).

Original entry on oeis.org

0, 1, 2, 4, 5, 6, 8, 9, 11, 12, 13, 15, 16, 18, 19, 20, 22, 23, 25, 26, 27, 29, 30, 32, 33, 34, 36, 37, 39, 40, 41, 43, 44, 46, 47, 48, 50, 51, 53, 54, 55, 57, 58, 60, 61, 62, 64, 65, 66, 68, 69, 71, 72, 73, 75, 76, 78, 79, 80, 82, 83, 85, 86, 87, 89, 90, 92, 93
Offset: 0

Views

Author

Sarah Nathanson, Oct 01 2014

Keywords

Comments

The Beatty complement is given in A248522. - M. F. Hasler, Oct 07 2014

Crossrefs

Programs

  • Java
    static int a(int n) {return (int) (n*Math.pow(Math.E, (1.0/3))); }
    
  • Mathematica
    Floor[Range[0,100]*Exp[1/3]] (* Paolo Xausa, Jul 16 2024 *)
  • PARI
    a(n)=n\exp(-1/3) \\ M. F. Hasler, Oct 07 2014

A248522 Beatty sequence for 1/(1-exp(-1/3)): a(n) = floor(n/(1-exp(-1/3))).

Original entry on oeis.org

3, 7, 10, 14, 17, 21, 24, 28, 31, 35, 38, 42, 45, 49, 52, 56, 59, 63, 67, 70, 74, 77, 81, 84, 88, 91, 95, 98, 102, 105, 109, 112, 116, 119, 123, 126, 130, 134, 137, 141, 144, 148, 151, 155, 158, 162, 165, 169, 172, 176, 179, 183, 186, 190, 194, 197, 201
Offset: 1

Views

Author

M. F. Hasler, Oct 07 2014

Keywords

Comments

Beatty complement of A247964.

Crossrefs

Programs

  • Mathematica
    Floor[Range[100]/(1 - Exp[-1/3])] (* Paolo Xausa, Jul 16 2024 *)
  • PARI
    a(n)=n\(1-exp(-1/3))
Previous Showing 11-20 of 31 results. Next