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.

A155167 (L)-sieve transform of A004767 = {3,7,11,15,...,4n-1,...}.

Original entry on oeis.org

1, 2, 3, 5, 7, 10, 14, 19, 26, 35, 47, 63, 85, 114, 153, 205, 274, 366, 489, 653, 871, 1162, 1550, 2067, 2757, 3677, 4903, 6538, 8718, 11625, 15501, 20669, 27559, 36746, 48995, 65327, 87103, 116138, 154851, 206469
Offset: 1

Views

Author

John W. Layman, Jan 21 2009

Keywords

Comments

See A152009 for the definition of the (L)-sieve transform.
This appears to be the same sequence that is defined in Problem 193 of Popular Computing, Number 55 (see link). - N. J. A. Sloane, Apr 16 2015

Crossrefs

Programs

  • Maple
    # Maple program for Popular Computing Problem 193, which produces terms which appear to match this sequence, from N. J. A. Sloane, Apr 16 2015
    with(LinearAlgebra): M:=1000;  B:=300;
    t1:=Array(1..M,0); t2:=Array(1..M,0); t3:=Array(1..M,-1);
    for n from 1 to M do t1[n]:=n+2; od:
    for n from 1 to B do
    i:=t1[1];
    if t3[i] = -1 then t3[i]:=n-1; fi;
    for j from 1 to i do t2[j]:=t1[j+1]; od:
    t2[i+1]:=i;
    for p from i+2 to M-2 do t2[p]:=t1[p]; od;
    for q from 1 to M-2 do t1[q]:=t2[q]; od:
    od:
    [seq(t3[n],n=3..B)];
  • Mathematica
    NestList[Floor[(4#+3)/3]&,1,40] (* Harvey P. Dale, Oct 04 2021 *)

Formula

All listed terms satisfy the recurrence a(n) = floor((4*a(n-1)+3)/3), with a(1)=1.

A087165 a(n)=1 when n == 1 (mod 4), otherwise a(n) = a(n - ceiling(n/4)) + 1. Removing all the 1's results in the original sequence with every term incremented by 1.

Original entry on oeis.org

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

Views

Author

Paul D. Hanna, Aug 24 2003

Keywords

Comments

Indices of records are given by A087192: a(A087192(n))=n, where A087192(n) = ceiling(A087192(n-1)*4/3).
From Benoit Cloitre, Mar 07 2009: (Start)
To construct the sequence:
Step 1: start from a sequence of 1's, leaving 3 undefined places between 1's, giving 1,(),(),(),1,(),(),(),1,(),(),(),1,(),(),(),1,(),(),(),1,...
Step 2: replace the first undefined place with a 2 and leave 3 undefined places between 2's, giving 1,2,(),(),1,(),2,(),1,(),(),2,1,(),(),(),1,2,(),(),1,...
Step 3: replace the first undefined place with a 3 and leave 3 undefined places between 3's, giving 1,2,3,(),1,(),2,(),1,3,(),2,1,(),(),3,1,2,(),(),1,...
Step 4: replace the first undefined place with a 4 and leave 3 undefined places between 4's, giving 1,2,3,4,1,(),2,(),1,3,(),2,1,4,(),3,1,2,(),(),1,...
Iterating the process indefinitely yields the sequence: 1,2,3,4,1,5,2,6,1,3,7,2,1,4,8,3,1,2,5,9,1,... (End)

Crossrefs

a(n+1) - a(n) = 4*A018902(n-3), n > 2.

Programs

  • Maple
    for n from 1 to 100 do
      if n mod 4 = 1 then A[n]:= 1
      else A[n]:= A[n - ceil(n/4)] + 1
      fi
    od:
    seq(A[n],n=1..100); # Robert Israel, Aug 05 2014
  • PARI
    a(n)=my(s); while(n>4, if(n%4==1, return(s+1)); n=(n\4*3)+max(n%4 - 1,0); s++); s+n \\ Charles R Greathouse IV, Sep 22 2022

Formula

a(n) = 4 + A244041(4*(n-1)) - A244041(4*n). - Tom Edgar and James Van Alstine, Aug 05 2014
a(4*n) = a(3*n)+1.
a(4*n+1) = 1.
a(4*n+2) = a(3*n+1)+1.
a(4*n+3) = a(3*n+2)+1. - Robert Israel, Aug 05 2014
a(n) < k*log(n) + 4 for n > 1 where k = 1/log(4/3) < 3.5. - Charles R Greathouse IV, Sep 22 2022

A363758 Maximum sum of digits for any number with n digits in fractional base 4/3.

Original entry on oeis.org

0, 3, 6, 8, 9, 12, 13, 15, 17, 19, 22, 24, 26, 28, 30, 32, 33, 36, 37, 40, 42, 44, 46, 48, 50, 52, 54, 56, 57, 60, 62, 65, 67, 70, 71, 73, 75, 77, 80, 83, 84, 87, 90, 93, 94, 96, 98, 101, 104, 106, 108, 109, 112, 115, 117, 120, 122, 123, 126, 129, 131, 133, 134
Offset: 0

Views

Author

Kevin Ryde, Jun 20 2023

Keywords

Comments

This sequence is strictly increasing since if a(n) is attained by the sum of digits of k, then the final digit of k is 3 and (k - (k mod 3))*4/3 + 3 is the same digits with a new second-least significant 1, 2 or 3 inserted, and so a(n+1) >= a(n) + 1.
Terms can be derived from A357425 by a(n) = s for the largest s where A357425(s) has n digits in base 4/3.

Examples

			For n=9, the numbers with 9 digits in base 4/3 are 60 to 79 and among them the maximum sum of digits is A244041(75) = 19 (those digits being 321023323), and so a(9) = 19.
		

Crossrefs

Cf. A024631 (base 4/3), A244041 (sum of digits).
Cf. A357425 (smallest with sum s), A087192.

Formula

a(n) = Max_{4*A087192(n-1) <= i < 4*A087192(n)} A244041(i), for n>=2.

A364751 Minimum sum of digits for any number of length n digits in fractional base 4/3.

Original entry on oeis.org

0, 3, 5, 6, 6, 8, 8, 9, 10, 10, 11, 11, 11, 11, 13, 14, 16, 17, 17, 17, 18, 19, 21, 22, 22, 23, 24, 26, 26, 26, 27, 28, 29, 29, 29, 29, 29, 29, 31, 33, 34, 35, 36, 37, 38, 38, 38, 39, 39, 41, 41, 42, 42, 43, 43, 45, 45, 46, 46, 48, 50, 50, 52, 52, 52, 52, 53, 55
Offset: 1

Views

Author

Kevin Ryde, Sep 07 2023

Keywords

Comments

0 is taken to be 1 digit long so a(1) = 0.
Terms can be derived from A364779 by a(n) = s for the smallest s where k = A364779(s) is >= n digits long (noting that stripping trailing 0's from k suffices to show numbers with sum of digits s exist at each length down to where sum s-1 exists).

Crossrefs

Cf. A024631 (base 4/3), A244041 (sum of digits), A364779 (largest with sum).
Cf. A363758 (maximum sum).

Formula

a(n) = Min_{4*A087192(n-1) <= k < 4*A087192(n)} A244041(k), for n >= 2.
Showing 1-4 of 4 results.