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

A006257 Josephus problem: a(2*n) = 2*a(n)-1, a(2*n+1) = 2*a(n)+1.

Original entry on oeis.org

0, 1, 1, 3, 1, 3, 5, 7, 1, 3, 5, 7, 9, 11, 13, 15, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55, 57, 59, 61, 63, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29
Offset: 0

Views

Author

Keywords

Comments

Write the numbers 1 through n in a circle, start at 1 and cross off every other number until only one number is left.
A version of the children's game "One potato, two potato, ...".
a(n)/A062383(n) = (0, 0.1, 0.01, 0.11, 0.001, ...) enumerates all binary fractions in the unit interval [0, 1). - Fredrik Johansson, Aug 14 2006
Iterating a(n), a(a(n)), ... eventually leads to 2^A000120(n) - 1. - Franklin T. Adams-Watters, Apr 09 2010
By inspection, the solution to the Josephus Problem is a sequence of odd numbers (from 1) starting at each power of 2. This yields a direct closed form expression (see formula below). - Gregory Pat Scandalis, Oct 15 2013
Also zero together with a triangle read by rows in which row n lists the first 2^(n-1) odd numbers (see A005408), n >= 1. Row lengths give A011782. Right border gives A000225. Row sums give A000302, n >= 1. See example. - Omar E. Pol, Oct 16 2013
For n > 0: a(n) = n + 1 - A080079(n). - Reinhard Zumkeller, Apr 14 2014
In binary, a(n) = ROL(n), where ROL = rotate left = remove the leftmost digit and append it to the right. For example, n = 41 = 101001_2 => a(n) = (0)10011_2 = 19. This also explains FTAW's comment above. - M. F. Hasler, Nov 02 2016
In the under-down Australian card deck separation: top card on bottom of a deck of n cards, next card separated on the table, etc., until one card is left. The position a(n), for n >= 1, from top will be the left over card. See, e.g., the Behrends reference, pp. 156-164. For the down-under case see 2*A053645(n), for n >= 3, n not a power of 2. If n >= 2 is a power of 2 the botton card survives. - Wolfdieter Lang, Jul 28 2020

Examples

			From _Omar E. Pol_, Jun 09 2009: (Start)
Written as an irregular triangle the sequence begins:
  0;
  1;
  1,3;
  1,3,5,7;
  1,3,5,7,9,11,13,15;
  1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31;
  1,3,5,7,9,11,13,15,17,19,21,23,25,27,29,31,33,35,37,39,41,
   43,45,47,49,51,53,55,57,59,61,63;
...
(End)
From _Omar E. Pol_, Nov 03 2018: (Start)
An illustration of initial terms, where a(n) is the area (or number of cells) in the n-th region of the structure:
   n   a(n)       Diagram
   0    0     _
   1    1    |_|_ _
   2    1      |_| |
   3    3      |_ _|_ _ _ _
   4    1          |_| | | |
   5    3          |_ _| | |
   6    5          |_ _ _| |
   7    7          |_ _ _ _|
(End)
		

References

  • Erhard Behrends, Der mathematische Zauberstab, Rowolth Taschenbuch Verlag, rororo 62902, 4. Auflage, 2019, pp. 156-164. [English version: The Math Behind the Magic, AMS, 2019.]
  • R. L. Graham, D. E. Knuth and O. Patashnik, Concrete Mathematics. Addison-Wesley, Reading, MA, 1990, p. 10.
  • M. S. Petković, "Josephus problem", Famous Puzzles of Great Mathematicians, page 179, Amer. Math. Soc. (AMS), 2009.
  • Michel Rigo, Formal Languages, Automata and Numeration Systems, 2 vols., Wiley, 2014. Mentions this sequence - see "List of Sequences" in Vol. 2.
  • N. J. A. Sloane and Simon Plouffe, The Encyclopedia of Integer Sequences, Academic Press, 1995 (includes this sequence).
  • Paul Weisenhorn, Josephus und seine Folgen, MNU, 59(2006), pp. 18-19.

Crossrefs

Second column, and main diagonal, of triangle A032434.
Cf. A181281 (with s=5), A054995 (with s=3).
Column k=2 of A360099.

Programs

  • Coq
    Require Import ZArith.
    Fixpoint a (n : positive) : Z :=
    match n with
    | xH => 1
    | xI n' => (2*(a n') + 1)%Z
    | xO n' => (2*(a n') - 1)%Z
    end.
    (* Stefan Haan, Aug 27 2023 *)
  • Haskell
    a006257 n = a006257_list !! n
    a006257_list =
       0 : 1 : (map (+ 1) $ zipWith mod (map (+ 1) $ tail a006257_list) [2..])
    -- Reinhard Zumkeller, Oct 06 2011
    
  • Magma
    [0] cat [2*(n-2^Floor(Log(2,n)))+1: n in [1..100]]; // Vincenzo Librandi, Jan 14 2016
    
  • Maple
    a(0):=0: for n from 1 to 100 do a(n):=(a(n-1)+1) mod n +1: end do:
    seq(a(i),i=0..100); # Paul Weisenhorn, Oct 10 2010; corrected by Robert Israel, Jan 13 2016
    A006257 := proc(n)
        convert(n,base,2) ;
        ListTools[Rotate](%,-1) ;
        add( op(i,%)*2^(i-1),i=1..nops(%)) ;
    end proc: # R. J. Mathar, May 20 2016
    A006257 := n -> 2*n  - Bits:-Iff(n, n):
    seq(A006257(n), n=0..78); # Peter Luschny, Sep 24 2019
  • Mathematica
    Table[ FromDigits[ RotateLeft[ IntegerDigits[n, 2]], 2], {n, 0, 80}] (* Robert G. Wilson v, Sep 21 2003 *)
    Flatten@Table[Range[1, 2^n - 1, 2], {n, 0, 5}] (* Birkas Gyorgy, Feb 07 2011 *)
    m = 5; Range[2^m - 1] + 1 - Flatten@Table[Reverse@Range[2^n], {n, 0, m - 1}] (* Birkas Gyorgy, Feb 07 2011 *)
  • PARI
    a(n)=sum(k=1,n,if(bitxor(n,k)Paul D. Hanna
    
  • PARI
    a(n)=if(n, 2*n-2^logint(2*n,2)+1, 0) \\ Charles R Greathouse IV, Oct 29 2016
    
  • Python
    import math
    def A006257(n):
         return 0 if n==0 else 2*(n-2**int(math.log(n,2)))+1 # Indranil Ghosh, Jan 11 2017
    
  • Python
    def A006257(n): return bool(n&(m:=1<Chai Wah Wu, Jan 22 2023
    (C#)
    static long cs_A006257(this long n) => n == 0 ? 0 : 1 + (1 + (n - 1).cs_A006257()) % n; // Frank Hollstein, Feb 24 2021
    

Formula

To get a(n), write n in binary, rotate left 1 place.
a(n) = 2*A053645(n) + 1 = 2(n-msb(n))+1. - Marc LeBrun, Jul 11 2001. [Here "msb" = "most significant bit", A053644.]
G.f.: 1 + 2/(1-x) * ((3*x-1)/(2-2*x) - Sum_{k>=1} 2^(k-1)*x^2^k). - Ralf Stephan, Apr 18 2003
a(n) = number of positive integers k < n such that n XOR k < n. a(n) = n - A035327(n). - Paul D. Hanna, Jan 21 2006
a(n) = n for n = 2^k - 1. - Zak Seidov, Dec 14 2006
a(n) = n - A035327(n). - K. Spage, Oct 22 2009
a(2^m+k) = 1+2*k; with 0 <= m and 0 <= k < 2^m; n = 2^m+k; m = floor(log_2(n)); k = n-2^m; a(n) = ((a(n-1)+1) mod n) + 1; a(1) = 1. E.g., n=27; m=4; k=11; a(27) = 1 + 2*11 = 23. - Paul Weisenhorn, Oct 10 2010
a(n) = 2*(n - 2^floor(log_2(n))) + 1 (see comment above). - Gregory Pat Scandalis, Oct 15 2013
a(n) = 0 if n = 0 and a(n) = 2*a(floor(n/2)) - (-1)^(n mod 2) if n > 0. - Marek A. Suchenek, Mar 31 2016
G.f. A(x) satisfies: A(x) = 2*A(x^2)*(1 + x) + x/(1 + x). - Ilya Gutkovskiy, Aug 31 2019
For n > 0: a(n) = 2 * A062050(n) - 1. - Frank Hollstein, Oct 25 2021

Extensions

More terms from Robert G. Wilson v, Sep 21 2003

A255588 Convert n to base 3, move the least significant digit to the most significant one and convert back to base 10.

Original entry on oeis.org

0, 1, 2, 1, 4, 7, 2, 5, 8, 3, 12, 21, 4, 13, 22, 5, 14, 23, 6, 15, 24, 7, 16, 25, 8, 17, 26, 9, 36, 63, 10, 37, 64, 11, 38, 65, 12, 39, 66, 13, 40, 67, 14, 41, 68, 15, 42, 69, 16, 43, 70, 17, 44, 71, 18, 45, 72, 19, 46, 73, 20, 47, 74, 21, 48, 75, 22, 49, 76, 23
Offset: 0

Views

Author

Paolo P. Lava, Feb 27 2015

Keywords

Comments

a(3*n) = n.
Fixed points of the transform are listed in A048328.

Examples

			10 in base 3 is 101: moving the least significant digit to the most significant one we have 110 that is 12 in base 10.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,k,n; print(0);
    for n from 1 to q do
    a:=convert(n,base,h); b:=[]; for k from 2 to nops(a) do b:=[op(b),a[k]]; od; a:=[op(b),a[1]];
    a:=convert(a,base,h,10); b:=0; for k from nops(a) by -1 to 1 do b:=10*b+a[k]; od;
    print(b); od; end: P(10^4,3);
  • Mathematica
    roll[n_, b_] := Block[{w = IntegerDigits[n, b]}, Prepend[Most@ w, Last@ w]]; b = 3; FromDigits[#, b] & /@ (roll[#, b] & /@ Range[0, 69]) (* Michael De Vlieger, Mar 04 2015 *)
    Table[FromDigits[RotateRight[IntegerDigits[n,3]],3],{n,0,70}] (* Harvey P. Dale, Feb 20 2022 *)
  • Python
    def A255588(n):
        x=A007089(n)
        return int(x[-1]+x[:-1], 3) # Indranil Ghosh, Feb 03 2017

A255594 Convert n to base 9, move least significant digit to most significant digit and convert back to base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 1, 10, 19, 28, 37, 46, 55, 64, 73, 2, 11, 20, 29, 38, 47, 56, 65, 74, 3, 12, 21, 30, 39, 48, 57, 66, 75, 4, 13, 22, 31, 40, 49, 58, 67, 76, 5, 14, 23, 32, 41, 50, 59, 68, 77, 6, 15, 24, 33, 42, 51, 60, 69, 78, 7, 16, 25, 34, 43, 52, 61
Offset: 0

Views

Author

Paolo P. Lava, Mar 02 2015

Keywords

Comments

Fixed points of the transform are listed in A048334.
For more than 2 base-9 digits, reversal and cyclic shifts of a number start to differ, so this sequence differs from A030108. - Alonso del Arte, Mar 22 2015

Examples

			13 in base 9 is 14: moving the least significant digit as the most significant one we have 41 that is 37 in base 10.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,k,n; print(0);
    for n from 1 to q do
    a:=convert(n,base,h); b:=[]; for k from 2 to nops(a) do b:=[op(b),a[k]]; od; a:=[op(b),a[1]];
    a:=convert(a,base,h,10); b:=0; for k from nops(a) by -1 to 1 do b:=10*b+a[k]; od;
    print(b); od; end: P(10^4,9);
  • Mathematica
    roll[n_, b_] := Block[{w = IntegerDigits[n, b]}, Prepend[Most@ w, Last@ w]]; b = 9; FromDigits[#, b] & /@ (roll[#, b] & /@ Range[0, 69]) (* Michael De Vlieger, Mar 04 2015 *)
    Table[FromDigits[RotateRight[IntegerDigits[n,9]],9],{n,0,80}] (* Harvey P. Dale, Jun 14 2024 *)

Formula

a(9*n) = n.
a(9^n) = 9^(n-1).

A088163 Numbers for which rotating one binary place to the right less rotating one binary place to the left is equal to zero.

Original entry on oeis.org

0, 1, 2, 3, 7, 10, 15, 31, 42, 63, 127, 170, 255, 511, 682, 1023, 2047, 2730, 4095, 8191, 10922, 16383, 32767, 43690, 65535, 131071, 174762, 262143, 524287, 699050, 1048575, 2097151, 2796202, 4194303, 8388607, 11184810, 16777215, 33554431, 44739242, 67108863
Offset: 0

Views

Author

Robert G. Wilson v, Sep 13 2003

Keywords

Comments

n is a member iff n is of the form 2^n -1 (A000225) or A000975(2n).

Crossrefs

Programs

  • Mathematica
    f[n_] := FromDigits[ RotateRight[ IntegerDigits[n, 2]], 2] - FromDigits[ RotateLeft[ IntegerDigits[n, 2]], 2]; Select[ Range[33560000], f[ # ] == 0 &]
    (* Or *) Union[ Join[ Table[2^n - 1, {n, 0, 25}], Table[ Ceiling[2(2^n - 1)/3], {n, 2, 24, 2}]]]
    LinearRecurrence[{0,0,5,0,0,-4},{0,1,2,3,7,10},40] (* Harvey P. Dale, Feb 20 2022 *)
  • PARI
    concat(0, Vec(x*(1+x)*(1+x+2*x^2) / ((1-x)*(1+x+x^2)*(1-4*x^3)) + O(x^50))) \\ Colin Barker, May 14 2016

Formula

Numbers n such that A038572(n) - A006257(n) = A088161(n) = 0.
From Colin Barker, May 14 2016: (Start)
a(n) = 5*a(n-3)-4*a(n-6) for n>5.
G.f.: x*(1+x)*(1+x+2*x^2) / ((1-x)*(1+x+x^2)*(1-4*x^3)).
(End)

A088161 n rotated one binary place to the right less n rotated one binary place to the left.

Original entry on oeis.org

0, 0, 0, 0, 1, 3, -2, 0, 3, 9, 0, 6, -3, 3, -6, 0, 7, 21, 4, 18, 1, 15, -2, 12, -5, 9, -8, 6, -11, 3, -14, 0, 15, 45, 12, 42, 9, 39, 6, 36, 3, 33, 0, 30, -3, 27, -6, 24, -9, 21, -12, 18, -15, 15, -18, 12, -21, 9, -24, 6, -27, 3, -30, 0, 31, 93, 28, 90, 25, 87, 22, 84, 19, 81, 16, 78, 13, 75, 10, 72, 7, 69, 4
Offset: 0

Views

Author

Robert G. Wilson v, Sep 13 2003

Keywords

Comments

f(n) is negative about 2/7 of the time to 10^7. f(n) is zero, see A088163.

Crossrefs

Programs

  • Maple
    f:= proc(n) local a,b;
      if n::even then a:= n/2 else a:= 2^ilog2(n) + (n-1)/2 fi;
      if n = 0 then b:= 0 else b:= 2*n + 1 - 2^(ilog2(n)+1) fi;
      a-b
    end proc:
    map(f, [$0..200]); # Robert Israel, Mar 03 2025
  • Mathematica
    f[n_] := FromDigits[ RotateRight[ IntegerDigits[n, 2]], 2] - FromDigits[ RotateLeft[ IntegerDigits[n, 2]], 2]; Table[ f[n], {n, 0, 82}]

Formula

a(n) = A038572(n) - A006257(n).

A088146 n-th prime rotated one binary place to the right.

Original entry on oeis.org

1, 3, 6, 7, 13, 14, 24, 25, 27, 30, 31, 50, 52, 53, 55, 58, 61, 62, 97, 99, 100, 103, 105, 108, 112, 114, 115, 117, 118, 120, 127, 193, 196, 197, 202, 203, 206, 209, 211, 214, 217, 218, 223, 224, 226, 227, 233, 239, 241, 242, 244, 247, 248, 253, 384, 387, 390
Offset: 1

Views

Author

Robert G. Wilson v, Sep 13 2003

Keywords

Crossrefs

Programs

  • Maple
    f:= proc(p) 2^ilog2(p)+(p-1)/2 end proc:
    f(2):= 1:
    map(f, [seq(ithprime(i),i=1..100)]); # Robert Israel, Sep 19 2019
  • Mathematica
    f[n_] := FromDigits[ RotateRight[ IntegerDigits[n, 2]], 2]; Table[ f[ Prime[i]], {i, 1, 60}]

A255589 Convert n to base 4, move the least significant digit to the most significant one and convert back to base 10.

Original entry on oeis.org

0, 1, 2, 3, 1, 5, 9, 13, 2, 6, 10, 14, 3, 7, 11, 15, 4, 20, 36, 52, 5, 21, 37, 53, 6, 22, 38, 54, 7, 23, 39, 55, 8, 24, 40, 56, 9, 25, 41, 57, 10, 26, 42, 58, 11, 27, 43, 59, 12, 28, 44, 60, 13, 29, 45, 61, 14, 30, 46, 62, 15, 31, 47, 63, 16, 80, 144, 208, 17, 81
Offset: 0

Views

Author

Paolo P. Lava, Mar 02 2015

Keywords

Comments

Fixed points of the transform are listed in A048329.

Examples

			11 in base 4 is 23: moving the least significant digit to the most significant one we have 32 that is 14 in base 10.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,k,n; print(0);
    for n from 1 to q do
    a:=convert(n,base,h); b:=[]; for k from 2 to nops(a) do b:=[op(b),a[k]]; od; a:=[op(b),a[1]];
    a:=convert(a,base,h,10); b:=0; for k from nops(a) by -1 to 1 do b:=10*b+a[k]; od;
    print(b); od; end: P(10^4,4);
  • Mathematica
    roll[n_, b_] := Block[{w = IntegerDigits[n, b]}, Prepend[Most@ w, Last@ w]]; b = 4; FromDigits[#, b] & /@ (roll[#, b] & /@ Range[0, 69]) (* Michael De Vlieger, Mar 04 2015 *)
    Array[FromDigits[RotateRight[IntegerDigits[#,4]],4]&,70,0] (* Harvey P. Dale, Mar 01 2016 *)
  • Python
    def A255589(n):
        x=str(A007090(n))
        return int(x[-1]+x[:-1],4) # Indranil Ghosh, Feb 03 2017

Formula

a(4*k) = k.
a(4^k) = 4^(k-1).

A255590 Convert n to base 5, move the least significant digit to the most significant one and convert back to base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 1, 6, 11, 16, 21, 2, 7, 12, 17, 22, 3, 8, 13, 18, 23, 4, 9, 14, 19, 24, 5, 30, 55, 80, 105, 6, 31, 56, 81, 106, 7, 32, 57, 82, 107, 8, 33, 58, 83, 108, 9, 34, 59, 84, 109, 10, 35, 60, 85, 110, 11, 36, 61, 86, 111, 12, 37, 62, 87, 112, 13, 38, 63, 88
Offset: 0

Views

Author

Paolo P. Lava, Mar 02 2015

Keywords

Comments

a(5*n) = n.
a(5^n) = 5^(n-1).
Fixed points of the transform are listed in A048330.

Examples

			14 in base 5 is 24: moving the least significant digit to the most significant one we have 42 that is 22 in base 10.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,k,n; print(0);
    for n from 1 to q do
    a:=convert(n,base,h); b:=[]; for k from 2 to nops(a) do b:=[op(b),a[k]]; od; a:=[op(b),a[1]];
    a:=convert(a,base,h,10); b:=0; for k from nops(a) by -1 to 1 do b:=10*b+a[k]; od;
    print(b); od; end: P(10^4,5);
  • Mathematica
    roll[n_, b_] := Block[{w = IntegerDigits[n, b]}, Prepend[Most@ w, Last@ w]]; b = 5; FromDigits[#, b] & /@ (roll[#, b] & /@ Range[0, 68]) (* Michael De Vlieger, Mar 04 2015 *)
    Table[FromDigits[RotateRight[IntegerDigits[n,5]],5],{n,0,100}] (* Harvey P. Dale, Jun 11 2025 *)
  • Python
    def A255590(n):
        x=str(A007091(n))
        return int(x[-1]+x[:-1], 5) # Indranil Ghosh, Feb 03 2017

A255591 Convert n to base 6, move least significant digit to most significant digit and convert back to base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 1, 7, 13, 19, 25, 31, 2, 8, 14, 20, 26, 32, 3, 9, 15, 21, 27, 33, 4, 10, 16, 22, 28, 34, 5, 11, 17, 23, 29, 35, 6, 42, 78, 114, 150, 186, 7, 43, 79, 115, 151, 187, 8, 44, 80, 116, 152, 188, 9, 45, 81, 117, 153, 189, 10, 46, 82, 118, 154, 190, 11
Offset: 0

Views

Author

Paolo P. Lava, Mar 02 2015

Keywords

Comments

a(6*n) = n.
Fixed points of the transform are listed in A048331.

Examples

			16 in base 6 is 24: moving the least significant digit to the most significant one we have 42 that is 26 in base 10.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,k,n; print(0);
    for n from 1 to q do
    a:=convert(n,base,h); b:=[]; for k from 2 to nops(a) do b:=[op(b),a[k]]; od; a:=[op(b),a[1]];
    a:=convert(a,base,h,10); b:=0; for k from nops(a) by -1 to 1 do b:=10*b+a[k]; od;
    print(b); od; end: P(10^4,6);
  • Mathematica
    roll[n_, b_] := Block[{w = IntegerDigits[n, b]}, Prepend[Most@ w, Last@ w]]; b = 6; FromDigits[#, b] & /@ (roll[#, b] & /@ Range[0, 66]) (* Michael De Vlieger, Mar 04 2015 *)
  • Python
    def A255591(n):
        x=A007092(n)
        return int(x[-1]+x[:-1],6) # Indranil Ghosh, Feb 03 2017

A255592 Convert n to base 7, move least significant digit to most significant digit and convert back to base 10.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 1, 8, 15, 22, 29, 36, 43, 2, 9, 16, 23, 30, 37, 44, 3, 10, 17, 24, 31, 38, 45, 4, 11, 18, 25, 32, 39, 46, 5, 12, 19, 26, 33, 40, 47, 6, 13, 20, 27, 34, 41, 48, 7, 56, 105, 154, 203, 252, 301, 8, 57, 106, 155, 204, 253, 302, 9, 58, 107, 156
Offset: 0

Views

Author

Paolo P. Lava, Mar 02 2015

Keywords

Comments

a(7*n) = n.
a(7^n) = 7^(n-1).
Fixed points of the transform are listed in A048332.

Examples

			11 in base 7 is 14: moving the least significant digit to the most significant one we have 41 that is 29 in base 10.
		

Crossrefs

Programs

  • Maple
    with(numtheory): P:=proc(q,h) local a,b,k,n; print(0);
    for n from 1 to q do
    a:=convert(n,base,h); b:=[]; for k from 2 to nops(a) do b:=[op(b),a[k]]; od; a:=[op(b),a[1]];
    a:=convert(a,base,h,10); b:=0; for k from nops(a) by -1 to 1 do b:=10*b+a[k]; od;
    print(b); od; end: P(10^4,7);
  • Mathematica
    roll[n_, b_] := Block[{w = IntegerDigits[n, b]}, Prepend[Most@ w, Last@ w]]; b = 7; FromDigits[#, b] & /@ (roll[#, b] & /@ Range[0, 66]) (* Michael De Vlieger, Mar 04 2015 *)
    Table[FromDigits[RotateRight[IntegerDigits[n,7]],7],{n,0,100}] (* Harvey P. Dale, Jan 27 2023 *)
Previous Showing 11-20 of 31 results. Next