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.

User: Robin Powell

Robin Powell's wiki page.

Robin Powell has authored 17 sequences. Here are the ten most recent ones:

A362557 Start with first term 0, then add paired terms counting every preceding term up to the largest term so far and loop back to 0 after every pair has been counted.

Original entry on oeis.org

0, 1, 0, 1, 1, 2, 0, 3, 1, 1, 2, 1, 3, 3, 0, 6, 1, 2, 2, 3, 3, 1, 6, 4, 0, 8, 1, 4, 2, 5, 3, 2, 4, 1, 5, 2, 6, 1, 8, 5, 0, 11, 1, 7, 2, 6, 3, 3, 4, 3, 5, 4, 6, 1, 7, 2, 8, 1, 11, 6, 0, 14, 1, 9, 2, 9, 3, 5, 4, 5, 5, 6, 6, 2, 7, 3, 8, 2, 9, 2, 11, 1, 14, 7, 0
Offset: 1

Author

Robin Powell, Apr 24 2023

Keywords

Comments

Same as A055186, except previous pairs from the same row are included in the count.

Examples

			Write "0". There is now "1 0". Now there is "1 1". We can't find any terms greater than 1, so we recheck the sequence for 0s and find "2 0(s)". Listing these terms in the order read out loud yields the sequence "0, 1, 0, 1, 1, 2, 0, ...".
		

Crossrefs

Programs

  • PARI
    seq(n)={my(L=List([0]), m=0, k=0); while(#Lt==k, L)); if(c, listput(L,c); listput(L,k); m=max(m,c));  k=if(k==m, 0, k+1)); Vec(L)} \\ Andrew Howroyd, May 02 2023

A361614 Set a(1)=0 and a(2)=1. For n > 1, if a(n) has already appeared in the sequence, then a(n+1) = number of steps since its first appearance. If a(n) has not appeared before, search instead for a(n)-1, then a(n)-2, etc., until you find a number that has appeared before.

Original entry on oeis.org

0, 1, 1, 1, 2, 3, 1, 5, 2, 4, 4, 1, 10, 5, 6, 7, 1, 15, 5, 11, 7, 5, 14, 3, 18, 7, 10, 14, 5, 21, 5, 23, 2, 28, 2, 30, 2, 32, 2, 34, 2, 36, 2, 38, 2, 40, 2, 42, 2, 44, 2, 46, 2, 48, 2, 50, 2, 52, 2, 54, 2, 56, 2, 58, 2, 60, 2, 62, 2, 64, 2, 66, 2, 68, 2, 70, 2
Offset: 1

Author

Robin Powell, Mar 17 2023

Keywords

Comments

The first 32 terms are distributed chaotically, after which the sequence alternates between 2 and n-6 indefinitely.

Examples

			We start with a(1) = 0 and a(2) = 1. 1 has not appeared before, so we search for the greatest valid integer less than 1, which in this case is 0. 0 first occurred at a(1), which is 1 term before a(2) so a(3) = 1.
1 first occurred 1 term before, so a(4) = 1.
1 appeared at term a(1), which is 2 terms before a(4), so a(5) = 2.
2 has not appeared before, so we search for 1, which occurred 3 terms before at a(1). a(6) = 3.
And so on.
		

Crossrefs

A333725 Number of primes between pairs of consecutive highly composite numbers (A002182).

Original entry on oeis.org

0, 1, 1, 2, 4, 2, 4, 2, 13, 11, 11, 20, 56, 18, 59, 58, 105, 307, 284, 278, 528, 515, 501, 241, 1684, 466, 456, 2491, 2403, 4676, 4561, 4459, 4396, 12839, 4202, 8317, 4111, 26274, 25673, 50073, 48866, 47998, 47441, 139491, 45881, 90692, 134351, 220465, 173831, 257677
Offset: 1

Author

Robin Powell, Apr 03 2020

Keywords

Examples

			There are no primes between HCN(1) and HCN(2), so a(1) = 0. The next term a(2) is equal to 1 as 3 is the only prime between HCN(2) and HCN(3); the prime 2 is not greater than HCN(2) and so is omitted here. The first gap to contain more than one prime occurs at a(4) = 2, which alludes to 7 and 11 being the only primes contained within HCN(4) and HCN(5).
		

Crossrefs

Programs

  • Mathematica
    Join[{0},PrimePi[#[[2]]]-PrimePi[#[[1]]]&/@Partition[DeleteDuplicates[Table[ {n,DivisorSigma[ 0,n]},{n,2,22*10^5}],GreaterEqual[#1[[2]],#2[[2]]]&][[All,1]],2,1]] (* Harvey P. Dale, Jan 09 2023 *)

Formula

a(n) = A000720(A002182(n+1)) - A000720(A002182(n)) for n > 1. - Amiram Eldar, Apr 26 2020

Extensions

More terms from Giovanni Resta, Apr 04 2020

A331703 Index of first occurrence of n in A328294, or 0 if n never appears.

Original entry on oeis.org

1, 2, 7, 14, 15, 13, 21, 28, 19, 40, 159, 79, 56, 47, 27, 36, 33, 58, 64, 81, 68, 90, 60, 85, 83, 132, 170, 107, 127, 80, 114, 55, 51, 109, 191, 152, 134, 171, 202, 192, 164, 138, 513, 96, 97, 166, 129, 126, 377, 651, 369, 95, 351, 232, 530, 244, 137, 110
Offset: 1

Author

Robin Powell, Jan 25 2020

Keywords

Crossrefs

A328294 Set a(1)=1 and a(2)=2. For n > 2, if a(n) had already appeared in the sequence, then a(n+1) = number of steps since its most recent appearance, as in Van Eck's sequence A181391. If a(n) had not appeared before, search instead for a(n)-1, then a(n)-2, etc., until you find a number that has appeared before.

Original entry on oeis.org

1, 2, 1, 2, 2, 1, 3, 2, 3, 2, 2, 1, 6, 4, 5, 1, 4, 3, 9, 6, 7, 1, 6, 3, 6, 2, 15, 8, 7, 8, 2, 5, 17, 6, 9, 16, 9, 2, 7, 10, 3, 17, 9, 6, 10, 5, 14, 2, 10, 4, 33, 9, 9, 1, 32, 13, 7, 18, 16, 23, 2, 13, 6, 19, 6, 2, 5, 21, 4, 19, 6, 6, 1, 19, 4, 6, 4, 2, 12, 30
Offset: 1

Author

Robin Powell, Oct 11 2019

Keywords

Comments

In other words, let a(1)=1, a(2)=2, and for any n >= 2, let v be the greatest value <= a(n) among the first n-1 terms; a(n+1) is the least d > 0 such that a(n-d) = v.

Examples

			We start with a(1) = 1 and a(2) = 2. 2 has not appeared before, so we search for the greatest valid integer less than 2, which in this case is 1. 1 last occurred at a(1), which is 1 term before, so a(3) = 1.
1 occurred 2 terms before, so a(4) = 2.
2 appeared at term a(2), which is 2 terms before, so a(5) = 2.
2 appeared most recently at term a(5), which is 1 term earlier, so a(6) = 1.
And so on.
		

Crossrefs

Programs

  • PARI
    seq(n)={my(a=vector(n)); a[1]=1; a[2]=2; for(n=2, n-1, my(m=1); for(i=2, n-1, if(a[i] <= a[n] && a[i] >= a[m], m=i)); a[n+1]=n-m); a} \\ Andrew Howroyd, Oct 25 2019

A306904 The geometric mean of the first n integers, rounded to the nearest integer.

Original entry on oeis.org

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

Author

Robin Powell, Mar 15 2019

Keywords

Comments

a(n) is the least k such that (k-1/2)^n < n!. - Robert Israel, May 05 2019

Examples

			a(5) is the 5th root of the product of the first 5 integers (approx. 2.605171) rounded up to 3.
		

Crossrefs

Cf. A000142, A061375 (floor instead of round), A214046.

Programs

  • Maple
    Res:= 1: last:= 1: v:= 1:
    for n from 2 to 100 do
      v:= n*v; t:= 2^n*v;
      for k from last while (2*k-1)^n < t do od:
      last:= k-1;
      Res:= Res, last;
    od:
    Res; # Robert Israel, May 05 2019
  • Mathematica
    Array[Round[#!^(1/#)] &, 68] (* Michael De Vlieger, Mar 31 2019 *)
    Table[Round[GeometricMean[Range[n]]],{n,70}] (* Harvey P. Dale, Mar 19 2023 *)
  • PARI
    a(n) = round(n!^(1/n)); \\ Michel Marcus, May 05 2019
    
  • Python
    from sympy import integer_nthroot, factorial
    def A306904(n): return (m:=int(integer_nthroot(f:=int(factorial(n)),n)[0]))+int((f<=((m<<1)+1)**n) # Chai Wah Wu, Jun 06 2025

Formula

a(n) = round(n!^(1/n)).
a(n) ~ n/e + log(n)/(2*e). - Robert Israel, May 05 2019

Extensions

Corrected by Robert Israel, May 05 2019

A306560 Smallest number of 1's required to build n using +, *, ^ and tetration.

Original entry on oeis.org

1, 2, 3, 4, 5, 5, 6, 5, 5, 6, 7, 7, 8, 8, 8, 5, 6, 7, 8, 8, 9, 9, 10, 8, 7, 8, 5, 6, 7, 8, 9, 7, 8, 8, 9, 7, 8, 9, 10, 10, 11, 11, 10, 11, 10, 11, 12, 8, 8, 9, 9, 10, 11, 7, 8, 8, 9, 9, 10, 10, 11, 11, 11, 7, 8, 9, 10, 10, 11, 11, 12, 9, 10, 10, 10, 11, 12, 11, 12, 10, 7, 8, 9, 9, 10, 11, 10
Offset: 1

Author

Robin Powell, Feb 23 2019

Keywords

Examples

			a(16) = 5 because 16 = (1+1)^^(1+1+1). (Note that 16 is also the smallest index at which this sequence differs from A025280.)
a(34) = 8 because 34 = ((1+1)^^(1+1+1)+1)*(1+1). - _Jens Ahlström_, Jan 11 2023
		

Crossrefs

Programs

  • Python
    from functools import lru_cache
    from sympy import factorint, divisors
    tetration = {2**2**2: 5, 2**2**2**2: 6, 3**3: 5, 4**4: 6, 5**5: 7}
    @lru_cache(maxsize=None)
    def a(n):
        res = n
        if n < 6:
            return res
        if n in tetration:
            return tetration[n]
        for i in range(1, n):
            res = min(res, a(i) + a(n-i))
        for d in [i for i in divisors(n) if i not in {1, n}]:
            res = min(res, a(d) + a(n//d))
        factors = factorint(n)
        exponents = set(factors.values())
        if len(exponents) == 1:
            e = exponents.pop()
            if e > 1:
                res = min(res, a(sum(factors.keys())) + a(e))
        return res
    # Jens Ahlström, Jan 11 2023

Extensions

a(34) onward corrected by Jens Ahlström, Jan 11 2023

A323727 Number of 1's required to build n using +, -, *, ^ and tetration.

Original entry on oeis.org

1, 2, 3, 4, 5, 5, 6, 5, 5, 6, 7, 7, 8, 7, 6, 5, 6, 7, 8, 8, 9, 9, 9, 8, 7, 6, 5, 6, 7, 8, 8, 7, 8, 9, 8, 7, 8, 9, 10, 10, 11, 11, 10, 11, 10, 10, 9, 8, 8, 9, 10, 9, 8, 7, 8, 9, 10, 10, 11, 11, 10, 9, 8, 7, 8, 9, 10, 11, 11, 10, 10, 9, 10, 10, 10, 11, 11, 10, 9
Offset: 1

Author

Robin Powell, Jan 25 2019

Keywords

Examples

			a(14) = 7 because 14 = (1+1)^^(1+1+1)-1-1. (Note that 14 is also the smallest index at which this sequence differs from A091334.)
		

Crossrefs

A272615 Numbers with digits in descending numerical order in base 2, 3 and 4 expansions.

Original entry on oeis.org

0, 1, 2, 3, 4, 8, 12, 63, 240
Offset: 1

Author

Robin Powell, May 03 2016

Keywords

Comments

a(10), if it exists, has more than 1000 decimal digits. Conjecture: there are no more terms in this sequence. - Charles R Greathouse IV, May 03 2016

Examples

			12 is 1100 in base 2, 110 in base 3 and 30 in base 4; in each representation every digit is smaller than or equal to the one proceeding so 12 is a term.
Similarly, 63 is 111111 in base 2, 2100 in base 3 and 333 in base 4 so it is also a term.
		

Crossrefs

Intersection of A023758, A023759, and A023760.

Programs

  • PARI
    dec(n,b)=my(v=digits(n,b)); v==vecsort(v,,4)
    is(n)=dec(n,2) && dec(n,3) && dec(n,4) \\ Charles R Greathouse IV, May 03 2016
    
  • PARI
    dec(n,b)=my(v=digits(n,b)); v==vecsort(v,,4)
    list(lim)=my(v=List([0]),t); for(i=1,logint(lim\1+1,4), t=4^i-1; while(t<=lim, if(dec(t,3), listput(v,t)); t*=4); t=2*4^i-2; while(t<=lim, if(dec(t,3), listput(v,t)); t*=4)); Set(v) \\ Charles R Greathouse IV, May 03 2016

A267218 a(n) is the a(n-1)-st a(n-2)-dimensional orthoplex number, starting with the terms 1, 2.

Original entry on oeis.org

1, 2, 2, 4, 16, 22016
Offset: 1

Author

Robin Powell, Jan 18 2016

Keywords

Examples

			16 is the 4th 2-orthoplex number = A000290(4).
22016 is the 16th 4-orthoplex number = A014820(16).
The next term will be the 22016th 16-orthoplex number.
		

Crossrefs