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-4 of 4 results.

A292031 a(n) is the smallest value m such that n appears in row m of A292030.

Original entry on oeis.org

0, 0, 0, 0, 3, 0, 5, 3, 0, 4, 9, 3, 11, 0, 4, 7, 15, 5, 3, 9, 6, 0, 21, 4, 23, 12, 8, 13, 5, 3, 29, 15, 10, 6, 0, 11, 35, 4, 7, 19, 39, 13, 41, 8, 14, 5, 45, 3, 9, 24, 16, 25, 51, 6, 53, 0, 18, 28, 11, 19, 4, 7, 20, 12, 63, 21, 65, 33, 13, 8, 69, 23, 71, 5, 24, 37, 3, 9, 15, 39, 26
Offset: 0

Views

Author

Ely Golden, Sep 08 2017

Keywords

Comments

a(n) = 0 if and only if n is a member of A000045.
a(n) is never 1 nor 2 since row 1 and 2 are equal to row 0 with a shift. - Michel Marcus, Sep 27 2017, amended by M. F. Hasler, Feb 26 2018

Examples

			a(3)=0 since A292030(0,5) = 3.
a(7)=3 since A292030(3,2) = 7.
		

Crossrefs

Cf. A292030.

Programs

  • Python
    def smallestSeq(n):
      if(n<0): return []
      if(n==0): return [0,0]
      j,r0,r1=0,0,1
      while(r1<=n): r0,r1=r1,r0+r1 ; j+=1
      while(r1>1):
        if(n%r1==r0): return [n//r1,j]
        r1,r0=r0,r1-r0
        j-=1
      return [n-1, j]
    for i in range(10001):
      print(str(i)+" "+str(smallestSeq(i)[0]))

A292032 a(n) is the value k such that A292030(A292031(n), k) = n.

Original entry on oeis.org

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

Views

Author

Ely Golden, Sep 08 2017

Keywords

Comments

a(n) > 0 for all n > 0.
for n != 1 the value is unique. For n = 1 A292030(A292031(n), 1) = A292030(A292031(1), 2) = 1. a(n) = 2 by convention.

Examples

			a(2)=3 since A292030(A292031(2),3) = A292030(0,3) = 2.
		

Crossrefs

Programs

  • Python
    def smallestSeq(n):
      if(n<0): return []
      if(n==0): return [0,0]
      j,r0,r1=0,0,1
      while(r1<=n): r0,r1=r1,r0+r1 ; j+=1
      while(r1>1):
        if(n%r1==r0): return [n//r1,j]
        r1,r0=r0,r1-r0
        j-=1
      return [n-1, j]
    for i in range(10001):
      print(str(i)+" "+str(smallestSeq(i)[1]))

A023548 Convolution of natural numbers >= 2 and Fibonacci numbers.

Original entry on oeis.org

2, 5, 11, 21, 38, 66, 112, 187, 309, 507, 828, 1348, 2190, 3553, 5759, 9329, 15106, 24454, 39580, 64055, 103657, 167735, 271416, 439176, 710618, 1149821, 1860467, 3010317, 4870814, 7881162, 12752008, 20633203, 33385245, 54018483, 87403764, 141422284
Offset: 1

Views

Author

Keywords

Comments

Minimal cost of maximum height Huffman tree of size n for strictly "worst case height" sequences. (A strictly "worst case height" sequence generates only maximum height Huffman trees; a non-strictly "worst case height" sequence can generate also non-maximum height Huffman trees.) - Alex Vinokur (alexvn(AT)barak-online.net), Oct 26 2004
Record-positions for A107910: A107910(a(n+2)) = A005578(n), A107910(m) < A005578(n) for m < a(n+2). - Reinhard Zumkeller, May 28 2005
From Jianing Song, Apr 28 2025: (Start)
For n >= 4, a(n-3) is the number of subsets of {1,2,...,n} with at least 2 elements that contain no consecutive elements modulo n. Note that:
- the number of subsets of {1,2,...,n} with k elements such that the difference of successive elements is at least 2 is binomial(n+1-k,k);
- the number of such subsets of {1,2,...,n} with k elements that contain both 1 and n is equal to the number of such subsets of {3,...,n-2} with k-2 elements, which is binomial(n-3-(k-2),k-2),
hence a(n) = Sum_{k=2..floor((n+1)/2)} binomial(n+1-k,k) - Sum_{k=0..floor((n-3)/2)} binomial(n-3-k,k) = (F(n+2) - binomial(n+1,0) - binomial(n,1)) - F(n-2) = F(n+1) + F(n-1) - (n+1).
If subsets of {1,2,...,n} are only required to contain no consecutive elements, then the result is A001924(n-2). (End)

Crossrefs

Antidiagonal sums of A292030.

Programs

  • GAP
    List([1..40], n-> Lucas(1,-1,n+3)[2] -n-4); # G. C. Greubel, Jul 08 2019
  • Magma
    [4*(Fibonacci(n+1)-1)+3*Fibonacci(n)-n: n in [1..40]]; // Vincenzo Librandi, Sep 16 2017
    
  • Mathematica
    Table[4(Fibonacci[n+1] -1) +3Fibonacci[n] -n, {n, 40}] (* Vincenzo Librandi, Sep 16 2017 *)
  • PARI
    a(n) = 4*fibonacci(n+1) + 3*fibonacci(n) - n - 4; \\ Michel Marcus, Sep 08 2016
    
  • PARI
    Vec(x*(2-x) / ((1-x-x^2)*(1-x)^2) + O(x^40)) \\ Colin Barker, Mar 11 2017
    
  • Sage
    [lucas_number2(n+3,1,-1) -n-4 for n in (1..40)] # G. C. Greubel, Jul 08 2019
    

Formula

From Wolfdieter Lang: (Start)
Convolution of natural numbers n >= 1 with Lucas numbers (A000032).
a(n) = 4*(F(n+1) - 1) + 3*F(n) - n, F(n)=A000045 (Fibonacci).
G.f.: x*(2-x)/((1-x-x^2)*(1-x)^2). (End)
For n >= 1, a(n) = L(n+3) - (n+4), where L(n) are Lucas numbers. - Mario Catalani (mario.catalani(AT)unito.it), Jul 22 2004
a(n) = F(n+4) + F(n+2) - (n+4) for n >= 1. - Alex Vinokur (alexvn(AT)barak-online.net), Oct 26 2004 [Offset corrected by Jianing Song, Apr 28 2025]
a(n) = (-4 + (2^(-n)*((1-sqrt(5))^n*(-5+2*sqrt(5)) + (1+sqrt(5))^n*(5+2*sqrt(5)))) / sqrt(5) - n). - Colin Barker, Mar 11 2017
a(n) = Sum_{i=1..n} C(n-i+2,i+1) + C(n-i+1,i). - Wesley Ivan Hurt, Sep 13 2017
E.g.f.: 2*exp(x/2)*(2*cosh((sqrt(5)*x)/2) + sqrt(5)*sinh((sqrt(5)*x)/2)) - exp(x)*(4 + x). - Stefano Spezia, May 21 2025

A292794 Numbers not congruent to A000045(k) mod A000045(k+1) for all k > 1.

Original entry on oeis.org

0, 4, 6, 10, 12, 16, 22, 24, 30, 36, 40, 42, 46, 52, 54, 64, 66, 70, 72, 82, 84, 90, 94, 96, 100, 102, 106, 114, 120, 124, 126, 130, 132, 136, 142, 150, 154, 156, 162, 166, 172, 174, 180, 184, 186, 192, 196, 204, 210, 214, 220, 222, 226, 232, 234, 240, 246, 250, 252, 256
Offset: 0

Views

Author

Ely Golden, Sep 23 2017

Keywords

Comments

For n > 0, also numbers n such that A292032(n) = 1.
It is conjectured that A035105(n) is always a member of this sequence for n >= 4 but this remains unproved.
This is the complement of (1 + 2Z) U (2 + 3Z) U (3 + 5Z) U (5 + 8Z) U ..., see also the Example section. - M. F. Hasler, Feb 25 2018

Examples

			a(2) = 6 since 6 mod 2 = 0, 6 mod 3 = 0, 6 mod 5 = 1, and 6 mod 8 = 6. (No other terms of A000045 need to be checked since the "illegal congruences" are all greater than 6, yet 6 is always congruent to 6 for those terms.)
From _M. F. Hasler_, Feb 26 2018: (Start)
This set can be constructed using a sieve which removes:
- first all numbers == 1 (mod 2), there remain the even numbers 0, 2, 4...;
- then all numbers == 2 (mod 3), i.e., == 2 (mod 6), there remain the numbers == 0 or 4 (mod 6): 0, 4, 6, 10, 12, 16, 18, 22, 24, 28, ...;
- then all numbers == 3 (mod 5), i.e., == 8 (mod 10), these are the numbers == 18 or 28 (mod 30), there remain numbers == 0, 4, 6, 10, 12, 16, 22 or 24 (mod 30);
- then all those == 5 (mod 8), but all these are odd;
- then all those == 8 (mod 13), i.e., == 8 (mod 26): there are 8 of these in [1..30*13], and there remain 8*(13-1) residue classes mod 30*13.
- then all those == 13 (mod 21): there are 48 of these left in [1..30*13*7], and there remain 8*12*7-48 = 48*(14-1) residue classes mod 30*13*7.
- then again there are none to remove == 21 (mod 34);
- then those == 34 (mod 55): these are 12*13 of the remaining 48*13*11 residue classes mod 30*13*7*11, so there remain 12*13*(4*11-1) of these; and so on.
This yields as upper bound of the asymptotic density: 1/2 * 2/3 * 4/5 * 12/13 * 13*14 * 43/44 ~ 0.223, the actual value is 0.2187...
(End)
		

Crossrefs

Cf. A300004 for the sequence of first differences.

Programs

  • Mathematica
    {0}~Join~Select[Range[3, 250], Function[n, NoneTrue[Block[{k = {1, 1}}, While[Last@ k <= n, AppendTo[k, Total@ Take[k, -2]]]; Partition[Most@ k, 2, 1]], Mod[n, #2] == #1 & @@ # &]]] (* Michael De Vlieger, Mar 19 2018 *)
  • PARI
    is_A292794(n,F=1)=!for(k=3,oo,F==n%(F=fibonacci(k))&&return;F>n&&break) \\ M. F. Hasler, Feb 25 2018

Formula

a(10^7) = 45721410, a(10^8) = 457214230, a(10^9) = 4572142416. - Jacques Tramu, Feb 26 2018
Showing 1-4 of 4 results.