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

A033095 Number of 1's when n is written in base b for 2<=b<=n+1.

Original entry on oeis.org

1, 1, 3, 4, 6, 6, 9, 6, 10, 10, 12, 11, 16, 13, 15, 14, 16, 13, 18, 15, 21, 20, 21, 16, 24, 20, 23, 23, 26, 25, 32, 22, 26, 25, 25, 28, 34, 28, 32, 30, 35, 30, 37, 31, 35, 36, 35, 31, 41, 34, 37, 36, 39, 35, 43, 38, 44, 41, 42, 38, 49, 40, 43
Offset: 1

Views

Author

Keywords

Crossrefs

Programs

  • Mathematica
    f[n_] := Count[Flatten@ Table[ IntegerDigits[n, b], {b, 2, n + 1}], 1]; Array[f, 63] (* Robert G. Wilson v, Nov 14 2012 *)

Formula

G.f.: x+(Sum_{b>=2} (Sum_{k>=0} x^(b^k)/(Sum_{0<=iFranklin T. Adams-Watters, Nov 03 2005

A053839 a(n) = (sum of digits of n written in base 4) modulo 4.

Original entry on oeis.org

0, 1, 2, 3, 1, 2, 3, 0, 2, 3, 0, 1, 3, 0, 1, 2, 1, 2, 3, 0, 2, 3, 0, 1, 3, 0, 1, 2, 0, 1, 2, 3, 2, 3, 0, 1, 3, 0, 1, 2, 0, 1, 2, 3, 1, 2, 3, 0, 3, 0, 1, 2, 0, 1, 2, 3, 1, 2, 3, 0, 2, 3, 0, 1, 1, 2, 3, 0, 2, 3, 0, 1, 3, 0, 1, 2, 0, 1, 2, 3, 2, 3, 0, 1, 3, 0, 1, 2, 0, 1, 2, 3, 1, 2, 3, 0, 3, 0, 1, 2, 0, 1, 2, 3, 1
Offset: 0

Views

Author

Henry Bottomley, Mar 28 2000

Keywords

Comments

a(n) is the third row of the array in A141803. - Andrey Zabolotskiy, May 16 2016
This is the fixed point of the morphism 0->0123, 1->1230, 2->2301, 3->3012 starting with 0. Let t be the (nonperiodic) sequence of positions of 0, and likewise, u for 1, v for 2, and w for 3; then t(n)/n -> 4, u(n)/n -> 4, v(n)/n -> 4, w(n)/n -> 4, and t(n) + u(n) + v(n) + w(n) = 16*n - 6 for n >= 1. - Clark Kimberling, May 31 2017

Examples

			First three iterations of the morphism 0->0123, 1->1230, 2->2301, 3->3012:
  0123
  0123123023013012
  0123123023013012123023013012012323013012012312303012012312302301
		

Crossrefs

Programs

  • Maple
    seq(convert(convert(n,base,4),`+`) mod 4, n=0..100); # Robert Israel, May 18 2016
  • Mathematica
    Mod[Total@ IntegerDigits[#, 4], 4] & /@ Range[0, 120] (* Michael De Vlieger, May 17 2016 *)
    s = Nest[Flatten[# /. {0 -> {0, 1, 2, 3}, 1 -> {1, 2, 3, 0}, 2 -> {2, 3, 0, 1}, 3 -> {3, 0, 1, 2}}] &, {0}, 9];   (* - Clark Kimberling, May 31 2017 *)
  • PARI
    a(n) = vecsum(digits(n,4)) % 4; \\ Michel Marcus, May 16 2016
    
  • PARI
    a(n) = sumdigits(n, 4) % 4; \\ Michel Marcus, Jul 04 2018

Formula

a(n) = A010873(A053737(n)). - Andrey Zabolotskiy, May 18 2016
G.f. G(x) satisfies x^81*G(x) - (x^72+x^75+x^78+x^81)*G(x^4) + (x^48+x^60+x^63-x^64+x^72+x^75-x^76+x^78-x^79-x^88-x^91-x^94)*G(x^16) + (-1+x^16-x^48-x^60-x^63+2*x^64+x^76+x^79-x^80+x^112+x^124+x^127-x^128-x^140-x^143)*G(x^64) + (1-x^16-x^64+x^80-x^256+x^272+x^320-x^336)*G(x^256) = 0. - Robert Israel, May 18 2016

A053831 Sum of digits of n written in base 11.

Original entry on oeis.org

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

Views

Author

Henry Bottomley, Mar 28 2000

Keywords

Comments

Also the fixed point of the morphism 0->{0,1,2,3,4,5,6,7,8,9,10}, 1->{1,2,3,4,5,6,7,8,9,10,11}, 2->{2,3,4,5,6,7,8,9,10,11,12}, etc. - Robert G. Wilson v, Jul 27 2006

Examples

			a(20) = 1 + 9 = 10 because 20 is written as 19 base 11.
		

Crossrefs

Sum of digits of n written in bases 2-16: A000120, A053735, A053737, A053824, A053827, A053828, A053829, A053830, A007953, this sequence, A053832, A053833, A053834, A053835, A053836.

Programs

  • C
    int Base11DigitSum(int n) {
       int count = 0;
       while (n != 0) { count += n % 11; n = n / 11; }
       return count;
    } // Tanar Ulric, Oct 20 2021
  • Mathematica
    Table[Plus @@ IntegerDigits[n, 11], {n, 0, 86}] (* or *)
    Nest[ Flatten[ #1 /. a_Integer -> Table[a + i, {i, 0, 10}]] &, {0}, 2] (* Robert G. Wilson v, Jul 27 2006 *)
  • PARI
    a(n)=if(n<1,0,if(n%11,a(n-1)+1,a(n/11)))
    
  • PARI
    a(n)=sumdigits(n,11) \\ Charles R Greathouse IV, Oct 20 2021
    

Formula

From Benoit Cloitre, Dec 19 2002: (Start)
a(0)=0, a(11n+i) = a(n)+i for 0 <= i <= 10.
a(n) = n-(m-1)*(Sum_{k>0} floor(n/m^k)) = n-(m-1)*A064458(n). (End)
a(n) = A138530(n,11) for n > 10. - Reinhard Zumkeller, Mar 26 2008
Sum_{n>=1} a(n)/(n*(n+1)) = 11*log(11)/10 (Shallit, 1984). - Amiram Eldar, Jun 03 2021

A244041 Sum of digits of n written in fractional base 4/3.

Original entry on oeis.org

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

Views

Author

Hailey R. Olafson, Jun 17 2014

Keywords

Comments

The base 4/3 expansion is unique and thus the sum of digits function is well-defined.

Examples

			In base 4/3 the number 14 is represented by 3212 and so a(14) = 3 + 2 + 1 + 2 = 8.
		

Crossrefs

Programs

  • Mathematica
    p:=4; q:=3; a[n_]:= a[n]= If[n==0, 0, a[q*Floor[n/p]] + Mod[n, p]]; Table[a[n], {n,0,75}] (* G. C. Greubel, Aug 20 2019 *)
  • PARI
    a(n) = p=4; q=3; if(n==0,0, a(q*(n\p)) + (n%p));
    vector(75, n, n--; a(n)) \\ G. C. Greubel, Aug 20 2019
  • Sage
    def base43sum(n):
        L, i = [n], 1
        while L[i-1]>3:
            x=L[i-1]
            L[i-1]=x.mod(4)
            L.append(3*floor(x/4))
            i+=1
        return sum(L)
    [base43sum(n) for n in [0..75]]
    

Formula

a(n) = A007953(A024631(n)). - Michel Marcus, Jun 17 2014
a(n) < 3 log(n)/log(4/3) < 11 log(n) for n > 1. Possibly the constant factor can be replaced by 7 or 8. - Charles R Greathouse IV, Sep 22 2022
Conjecture: a(n) >> log(n), hence a(n) ≍ log(n). - Charles R Greathouse IV, Nov 03 2022

A173525 a(n) = 1 + A053824(n-1), where A053824 = sum of digits in base 5.

Original entry on oeis.org

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

Views

Author

Omar E. Pol, Feb 20 2010

Keywords

Comments

Also: a(n) = A053824(5^k+n-1) in the limit k->infinity, where k plays the role of a row index in A053824. (See the comment by M. F. Hasler for the proof.)
This means: if A053824 is regarded as a triangle then the rows converge to this sequence.
See conjecture in the entry A000120, and the case of base 2 in A063787.
From R. J. Mathar, Dec 09 2010: (Start)
In base b=5, A053824 starts counting up from 1 each time the index wraps around a power of b: A053824(b^k)=1.
Obvious recurrences are A053824(m*b^k+i) = m+A053824(i), 1 <= m < b-1, 0 <= i < b^(k-1).
So A053824 can be decomposed into a triangle T(k,n) = A053824(b^k+n-1), assuming that column indices start at n=1; row lengths are (b-1)*b^k.
There is a self-similarity in these sequences; a sawtooth structure of periodicity b is added algebraically on top of a sawtooth structure of periodicity b^2, on top of a periodicity b^3 etc. This leads to some "fake" finitely periodic substructures in the early parts of each row of T(.,.): often, but not always, a(n+b)=1+a(n). Often, but not always, a(n+b^2)=1+a(n) etc.
The common part of the rows T(.,.) grows with the power of b as shown in the recurrence above, and defines a(n) in the limit of large row indices k. (End)
The two definitions agree because the first 5^r terms in each row correspond to numbers 5^r, 5^r+1,...,5^r+(5^r-1), which are written in base 5 as a leading 1 plus the digits of 0,...,5^r-1. - M. F. Hasler, Dec 09 2010
From Omar E. Pol, Dec 10 2010: (Start)
In the scatter plots of these sequences, the basic structure is an element with b^2 points, where b is the associated base. (Scatter plots are created with the "graph" button of a sequence.) Sketches of these structures look as follows, the horizontal axis a squeezed version of the index n, b consecutive points packed vertically, and the vertical axis a(n):
........................................................
................................................ * .....
............................................... ** .....
..................................... * ...... *** .....
.................................... ** ..... **** .....
.......................... * ...... *** .... ***** .....
......................... ** ..... **** ... ****** .....
............... * ...... *** .... ***** ... ***** ......
.............. ** ..... **** .... **** .... **** .......
.... * ...... *** ..... *** ..... *** ..... *** ........
... ** ...... ** ...... ** ...... ** ...... ** .........
... * ....... * ....... * ....... * ....... * ..........
........................................................
... b=2 ..... b=3 ..... b=4 ..... b=5 ..... b=6 ........
........................................................
............................................. * ........
............................................ ** ........
........................... * ............. *** ........
.......................... ** ............ **** ........
........... *............ *** ........... ***** ........
.......... ** .......... **** .......... ****** ........
......... ***.......... ***** ......... ******* ........
........ **** ........ ****** ........ ******** ........
....... ***** ....... ******* ....... ********* ........
...... ****** ...... ******** ....... ******** .........
..... ******* ...... ******* ........ ******* ..........
..... ****** ....... ****** ......... ****** ...........
..... ***** ........ ***** .......... ***** ............
..... **** ......... **** ........... **** .............
..... *** .......... *** ............ *** ..............
..... ** ........... ** ............. ** ...............
..... * ............ * .............. * ................
........................................................
..... b=7 .......... b=8 ............ b=9 ..............
... A053828 ...... A053829 ........ A053830 ............
... A173527 ...... A173528 ........ A173529 ............(End)

Crossrefs

Programs

  • Haskell
    a173525 = (+ 1) . a053824 . (subtract 1) -- Reinhard Zumkeller, Jan 31 2014
  • Maple
    A053825 := proc(n) add(d, d=convert(n,base,5)) ; end proc:
    A173525 := proc(n) local b,k; b := 5 ; if n < b then n; else k := n/(b-1);   k := ceil(log(k)/log(b)) ; A053825(b^k+n-1) ; end if; end proc:
    seq(A173525(n),n=1..100) ;
  • Mathematica
    Total[IntegerDigits[#,5]]+1&/@Range[0,100] (* Harvey P. Dale, Jun 14 2015 *)
  • PARI
    A173525(n)={ my(s=1); n--; until(!n\=5, s+=n%5); s } \\ M. F. Hasler, Dec 09 2010
    
  • PARI
    A173525(n)={ my(s=1+(n=divrem(n-1,5))[2]); while((n=divrem(n[1],5))[1],s+=n[2]); s+n[2] } \\ M. F. Hasler, Dec 09 2010
    

Formula

a(n) = A053824(5^k + n - 1) where k >= ceiling(log_5(n/4)). - R. J. Mathar, Dec 09 2010

Extensions

More terms from Vincenzo Librandi, Aug 02 2010

A346688 Replace 4^k with (-1)^k in base-4 expansion of n.

Original entry on oeis.org

0, 1, 2, 3, -1, 0, 1, 2, -2, -1, 0, 1, -3, -2, -1, 0, 1, 2, 3, 4, 0, 1, 2, 3, -1, 0, 1, 2, -2, -1, 0, 1, 2, 3, 4, 5, 1, 2, 3, 4, 0, 1, 2, 3, -1, 0, 1, 2, 3, 4, 5, 6, 2, 3, 4, 5, 1, 2, 3, 4, 0, 1, 2, 3, -1, 0, 1, 2, -2, -1, 0, 1, -3, -2, -1, 0, -4, -3, -2, -1, 0, 1, 2, 3, -1, 0, 1, 2, -2, -1, 0, 1, -3, -2, -1, 0, 1, 2, 3, 4, 0, 1, 2, 3, -1
Offset: 0

Views

Author

Ilya Gutkovskiy, Jul 29 2021

Keywords

Comments

If n has base-4 expansion abc..xyz with least significant digit z, a(n) = z - y + x - w + ...

Examples

			54 = 312_4, 2 - 1 + 3 = 4, so a(54) = 4.
		

Crossrefs

Programs

  • Mathematica
    nmax = 104; A[] = 0; Do[A[x] = x (1 + 2 x + 3 x^2)/(1 - x^4) - (1 + x + x^2 + x^3) A[x^4] + O[x]^(nmax + 1) // Normal, nmax + 1]; CoefficientList[A[x], x]
    Table[n + 5 Sum[(-1)^k Floor[n/4^k], {k, 1, Floor[Log[4, n]]}], {n, 0, 104}]
  • Python
    from sympy.ntheory.digits import digits
    def a(n):
        return sum(bi*(-1)**k for k, bi in enumerate(digits(n, 4)[1:][::-1]))
    print([a(n) for n in range(105)]) # Michael S. Branicky, Jul 29 2021

Formula

G.f. A(x) satisfies: A(x) = x * (1 + 2*x + 3*x^2) / (1 - x^4) - (1 + x + x^2 + x^3) * A(x^4).
a(n) = n + 5 * Sum_{k>=1} (-1)^k * floor(n/4^k).

A054893 a(n) = Sum_{j > 0} floor(n/4^j).

Original entry on oeis.org

0, 0, 0, 0, 1, 1, 1, 1, 2, 2, 2, 2, 3, 3, 3, 3, 5, 5, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 10, 10, 10, 10, 11, 11, 11, 11, 12, 12, 12, 12, 13, 13, 13, 13, 15, 15, 15, 15, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, 21, 21, 21, 21, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24
Offset: 0

Views

Author

Henry Bottomley, May 23 2000

Keywords

Comments

Different from highest power of 4 dividing n! (see A090616).

Examples

			  a(10^0) = 0.
  a(10^1) = 2.
  a(10^2) = 32.
  a(10^3) = 330.
  a(10^4) = 3331.
  a(10^5) = 33330.
  a(10^6) = 333330.
  a(10^7) = 3333329.
  a(10^8) = 33333328.
  a(10^9) = 333333326.
		

Crossrefs

Cf. A053737, A235127 (first differences).

Programs

  • Magma
    function A054893(n)
      if n eq 0 then return n;
      else return A054893(Floor(n/4)) + Floor(n/4);
      end if; return A054893;
    end function;
    [A054893(n): n in [0..103]]; // G. C. Greubel, Feb 09 2023
    
  • Mathematica
    Table[t=0; p=4; While[s=Floor[n/p]; t=t+s; s>0, p *= 4]; t, {n,0,100}]
    Table[Total[Floor/@(n/NestList[4#&,4,6])],{n,0,80}] (* Harvey P. Dale, Jun 12 2022 *)
  • PARI
    a(n) = (n - sumdigits(n,4))/3; \\ Kevin Ryde, Jan 08 2024
  • SageMath
    def A054893(n):
        if (n==0): return 0
        else: return A054893(n//4) + (n//4)
    [A054893(n) for n in range(104)] # G. C. Greubel, Feb 09 2023
    

Formula

a(n) = floor(n/4) + floor(n/16) + floor(n/64) + floor(n/256) + ...
a(n) = (n - A053737(n))/3.
From Hieronymus Fischer, Sep 15 2007: (Start)
a(n) = a(floor(n/4)) + floor(n/4).
a(4*n) = a(n) + n.
a(n*4^m) = a(n) + n*(4^m-1)/3.
a(k*4^m) = k*(4^m-1)/3, for 0 <= k < 4, m >= 0.
Asymptotic behavior:
a(n) = n/3 + O(log(n)),
a(n+1) - a(n) = O(log(n)); this follows from the inequalities below.
a(n) <= (n-1)/3; equality holds true for powers of 4.
a(n) >= (n-3)/3 - floor(log_4(n)); equality holds true for n = 4^m - 1, m>0. lim inf (n/3 - a(n)) = 1/3, for n-->oo.
lim sup (n/3 - log_4(n) - a(n)) = 0, for n-->oo.
lim sup (a(n+1) - a(n) - log_4(n)) = 0, for n-->oo.
G.f.: (1/(1-x))*Sum_{k > 0} x^(4^k)/(1-x^(4^k)). (End)
Partial sums of A235127. - R. J. Mathar, Jul 08 2021

Extensions

Edited by Hieronymus Fischer, Sep 15 2007
Examples added by Hieronymus Fischer, Jun 06 2012

A239690 Base 4 sum of digits of prime(n).

Original entry on oeis.org

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

Views

Author

Tom Edgar, Mar 24 2014

Keywords

Comments

a(n) is the rank of prime(n) in the base-4 dominance order on the natural numbers.

Examples

			The sixth prime is 13, 13 in base 4 is (3,1) so a(6)=3+1=4.
		

Crossrefs

Programs

  • Haskell
    a239690 = a053737 . a000040  -- Reinhard Zumkeller, Mar 20 2015
  • Magma
    [&+Intseq(NthPrime(n),4): n in [1..100]]; // Vincenzo Librandi, Mar 25 2014
    
  • Mathematica
    Table[Plus @@ IntegerDigits[Prime[n], 4], {n, 1, 100}] (* Vincenzo Librandi, Mar 25 2014 *)
  • Sage
    [sum(i.digits(base=4)) for i in primes_first_n(200)]
    

Formula

a(n) = A053737(A000040(n)).

A240236 Triangle read by rows: sum of digits of n in base k, for 2<=k<=n.

Original entry on oeis.org

1, 2, 1, 1, 2, 1, 2, 3, 2, 1, 2, 2, 3, 2, 1, 3, 3, 4, 3, 2, 1, 1, 4, 2, 4, 3, 2, 1, 2, 1, 3, 5, 4, 3, 2, 1, 2, 2, 4, 2, 5, 4, 3, 2, 1, 3, 3, 5, 3, 6, 5, 4, 3, 2, 1, 2, 2, 3, 4, 2, 6, 5, 4, 3, 2, 1, 3, 3, 4, 5, 3, 7, 6, 5, 4, 3, 2, 1, 3, 4, 5, 6, 4, 2, 7, 6, 5, 4, 3, 2, 1
Offset: 2

Views

Author

Keywords

Examples

			Triangle starts:
  1
  2 1
  1 2 1
  2 3 2 1
  2 2 3 2 1
  3 3 4 3 2 1
		

Crossrefs

Row sums give A043306.
See A138530 for another version.

Programs

  • Haskell
    a240236 n k = a240236_tabl !! (n-1) !! (k-1)
    a240236_row n = a240236_tabl !! (n-1)
    a240236_tabl = zipWith (map . flip q)
                           [2..] (map tail $ tail a002260_tabl) where
       q b n = if n < b then n else q b n' + d where (n', d) = divMod n b
    -- Reinhard Zumkeller, Apr 29 2015
  • Mathematica
    Table[Total[Flatten[IntegerDigits[n,k]]],{n,20},{k,2,n}]//Flatten (* Harvey P. Dale, Jan 13 2025 *)
  • PARI
    T(n,k) = local(r=0);if(k<2,-1,while(n>0,r+=n%k;n\=k);r)
    
  • PARI
    T(n, k) = sumdigits(n, k) \\ Zhuorui He, Aug 25 2025
    

Formula

T(n,k) = n - (k - 1) * Sum_{i=1..floor(log_k(n))} floor(n/k^i). - Ridouane Oudra, Sep 27 2024
T(n,k) = n - (k - 1) * A090623(n,k). - Zhuorui He, Aug 25 2025

A194974 Interspersion fractally induced by A194973, a rectangular array, by antidiagonals.

Original entry on oeis.org

1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 13, 14, 15, 12, 16, 19, 20, 21, 17, 18, 22, 26, 27, 28, 23, 24, 25, 29, 34, 35, 36, 30, 31, 32, 33, 37, 43, 44, 45, 38, 40, 41, 42, 39, 46, 53, 54, 55, 47, 50, 51, 52, 48, 49, 56, 64, 65, 66, 57, 61, 62, 63, 58, 59, 60, 67, 76, 77
Offset: 1

Views

Author

Clark Kimberling, Sep 07 2011

Keywords

Comments

See A194959 for a discussion of fractalization and the interspersion fractally induced by a sequence.

Examples

			Northwest corner:
1...2...4...7...11
3...5...8...13..19
6...9...14..20..27
10..15..21..28..36
12..17..23..30..38
		

Crossrefs

Programs

  • Mathematica
    p[n_] := Floor[(n + 3)/4] + Mod[n - 1, 4]
    Table[p[n], {n, 1, 90}]  (* A053737(n+4), n>=0 *)
    g[1] = {1}; g[n_] := Insert[g[n - 1], n, p[n]]
    f[1] = g[1]; f[n_] := Join[f[n - 1], g[n]]
    f[20]  (* A194973 *)
    row[n_] := Position[f[30], n];
    u = TableForm[Table[row[n], {n, 1, 5}]]
    v[n_, k_] := Part[row[n], k];
    w = Flatten[Table[v[k, n - k + 1], {n, 1, 13},
    {k, 1, n}]]  (* A194974 *)
    q[n_] := Position[w, n]; Flatten[Table[q[n],
    {n, 1, 80}]]  (* A194975 *)
Previous Showing 31-40 of 51 results. Next