[go: up one dir, main page]

login

Year-end appeal: Please make a donation to the OEIS Foundation to support ongoing development and maintenance of the OEIS. We are now in our 61st year, we have over 378,000 sequences, and we’ve reached 11,000 citations (which often say “discovered thanks to the OEIS”).

Search: a008713 -id:a008713
     Sort: relevance | references | number | modified | created      Format: long | short | data
Triangle read by rows in which k-th entry in row n is representation of n in base k, for 1 <= k <= n.
+10
6
1, 11, 10, 111, 11, 10, 1111, 100, 11, 10, 11111, 101, 12, 11, 10, 111111, 110, 20, 12, 11, 10, 1111111, 111, 21, 13, 12, 11, 10, 11111111, 1000, 22, 20, 13, 12, 11, 10, 111111111, 1001, 100, 21, 14, 13, 12, 11, 10, 1111111111, 1010, 101, 22, 20, 14, 13
OFFSET
1,2
COMMENTS
Representation of n in base 1 is defined to be a concatenation of n 1's.
It is difficult to write twenty-one in base 11 using decimal digits.
Representation in bases greater than 10 are written in base 10. This is really nasty! - N. J. A. Sloane, Dec 06 2002
EXAMPLE
Rows start (1), (11, 10), (111, 11, 10), (1111, 100, 11, 10), etc.
MATHEMATICA
f[n_] := Flatten[ Append[ {FromDigits[ Table[1, {n}]] }, Table[ FromDigits[ IntegerDigits[n, i]], {i, 2, n}]]]; Flatten[ Table[ f[n], {n, 1, 10}]] (* Robert G. Wilson v *)
CROSSREFS
Cf. A063431.
Columns are truncated versions of A000042, A007088, A007089, A007090, A007091, A007092, A007093, A007094, A007095, A000027 and perhaps A055649, etc.
Without the 1st column becomes A004053.
KEYWORD
base,nonn,tabl
AUTHOR
Henry Bottomley, Jul 20 2001
STATUS
approved
a(n) is n written in base n mod 10, or 0 if n mod 10 = 0.
+10
5
1, 10, 10, 10, 10, 10, 10, 10, 10, 0, 11111111111, 1100, 111, 32, 30, 24, 23, 22, 21, 0, 111111111111111111111, 10110, 212, 120, 100, 42, 36, 34, 32, 0, 1111111111111111111111111111111, 100000, 1020, 202, 120, 100, 52, 46, 43, 0
OFFSET
1,2
EXAMPLE
In base 1, n =11...11=n written n times; in base 0 baseform is taken as 0.
MATHEMATICA
Table[BaseForm[w, Mod[w, 10]], {w, 1, 128}]
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Labos Elemer, Jul 12 2002
STATUS
approved
Primes of form 4k+3 written in base 3.
+10
5
10, 21, 102, 201, 212, 1011, 1121, 1202, 2012, 2111, 2122, 2221, 10002, 10211, 10222, 11201, 11212, 12011, 12121, 20001, 20012, 20122, 21002, 21101, 21211, 22021, 22102, 22212, 100022, 100202, 101001, 101111, 102101, 102112, 110021
OFFSET
1,1
EXAMPLE
83 ~ 10002 in base 3.
MATHEMATICA
Do[s=Prime[n]; If[Mod[s, 4]==3, Print[BaseForm[s, 3]]], {n, 1, 256}]
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Labos Elemer, Jul 12 2002
STATUS
approved
n-th prime prime(n) written in base (prime(n) (mod prime(n-1))).
+10
5
111, 101, 111, 23, 1101, 101, 10011, 113, 45, 11111, 101, 221, 101011, 233, 125, 135, 111101, 151, 1013, 1001001, 211, 1103, 225, 141, 1211, 1100111, 1223, 1101101, 1301, 91, 2003, 345, 10001011, 149, 10010111, 421, 431, 2213, 445, 455, 10110101
OFFSET
2,1
LINKS
Alois P. Heinz, Table of n, a(n) for n = 2..62 (a(63) needs digits > 9)
EXAMPLE
Eventually non-decimal digit symbols appear, as in case of 307=17d, in base 14 = 307 mod 293.
MAPLE
a:= proc(n) local b, p, l;
p:= ithprime(n); b:= irem(p, prevprime(p));
if b=1 then l:= 1$p
else l:= ""; while p>0 do l:= irem(p, b, 'p'), l od
fi; parse(cat(l))
end:
seq(a(n), n=2..62); # Alois P. Heinz, Sep 05 2019
MATHEMATICA
Table[BaseForm[Prime[w], Mod[Prime[w], Prime[w-1]]], {w, 2, 128}]
Join[{111}, FromDigits[IntegerDigits[#[[2]], Mod[#[[2]], #[[1]]]]]&/@ Partition[ Prime[Range[2, 50]], 2, 1]] (* Harvey P. Dale, Jul 03 2021 *)
PROG
(PARI) a(n) = {my(p=prime(n), q=prime(n-1)); if ((p % q) != 1, d=digits(p, p % q); if (#select(x->(x>9), d), 0, fromdigits(d, 10)), fromdigits(vector(p, k, 1), 10)); } \\ Michel Marcus, Sep 05 2019
CROSSREFS
KEYWORD
nonn,base
AUTHOR
Labos Elemer, Jul 12 2002
EXTENSIONS
Name corrected by Michel Marcus, Sep 05 2019
STATUS
approved
n-th prime prime(n) written in base (prime(n) (mod 4)).
+10
4
10, 10, 11111, 21, 102, 1111111111111, 11111111111111111, 201, 212, 11111111111111111111111111111, 1011, 1111111111111111111111111111111111111, 11111111111111111111111111111111111111111, 1121, 1202, 11111111111111111111111111111111111111111111111111111, 2012
OFFSET
1,1
LINKS
EXAMPLE
4k+1 primes are written in base 1, while 4k+3 primes are in base 3.
MATHEMATICA
Table[FromDigits@ If[#2 == 1, ConstantArray[1, #1], IntegerDigits[#1, #2]] & @@ {#, Mod[#, 4]} &@ Prime@ w, {w, 17}] (* Michael De Vlieger, Sep 04 2019 *)
PROG
(PARI) a(n) = {my(p=prime(n)); if ((p % 4) != 1, fromdigits(digits(p, p % 4), 10), fromdigits(vector(p, k, 1), 10)); } \\ Michel Marcus, Sep 04 2019
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Labos Elemer, Jul 12 2002
STATUS
approved
Primes of the form 6k+5 written in base 5.
+10
3
10, 21, 32, 43, 104, 131, 142, 203, 214, 241, 313, 324, 401, 412, 423, 1011, 1022, 1044, 1132, 1143, 1204, 1231, 1242, 1402, 1413, 1424, 2001, 2012, 2023, 2034, 2111, 2133, 2221, 2232, 2342, 2403, 2414, 3013, 3024, 3101, 3134, 3211, 3233, 3244, 3321
OFFSET
1,1
LINKS
FORMULA
a(n) = A007091(A007528(n)). - Michel Marcus, Jul 09 2018
EXAMPLE
41 = 25 + 3*5 + 1 = 131_5.
MATHEMATICA
Do[s=Prime[n]; If[Mod[s, 6]==5, Print[BaseForm[s, 5]]], {n, 1, 256}]
FromDigits[IntegerDigits[#, 5]] & /@ Select[Table[6 n + 5, {n, 0, 100}], PrimeQ] (* Harvey P. Dale, Oct 05 2023 *)
PROG
(PARI) lista(nn) = for (n=0, nn, if (isprime(p=6*n+5), print1(fromdigits(digits(p, 5)), ", "))); \\ Michel Marcus, Jul 09 2018
CROSSREFS
KEYWORD
base,nonn
AUTHOR
Labos Elemer, Jul 12 2002
STATUS
approved
Square array read by antidiagonals of n written in base k (n,k>0).
+10
1
1, 1, 11, 1, 10, 111, 1, 2, 11, 1111, 1, 2, 10, 100, 11111, 1, 2, 3, 11, 101, 111111, 1, 2, 3, 10, 12, 110, 1111111, 1, 2, 3, 4, 11, 20, 111, 11111111, 1, 2, 3, 4, 10, 12, 21, 1000, 111111111, 1, 2, 3, 4, 5, 11, 13, 22, 1001, 1111111111, 1, 2, 3, 4, 5, 10, 12, 20, 100
OFFSET
1,3
COMMENTS
It is difficult to write ten in base 11 using decimal digits.
EXAMPLE
Rows start (1, 1, 1, 1, 1,...), (11, 10, 2, 2, 2,...), (111, 11, 10, 3, 3,...), (1111, 100, 11, 10, 4,...), etc.
CROSSREFS
KEYWORD
base,nonn,tabl
AUTHOR
Henry Bottomley, Jul 20 2001
STATUS
approved

Search completed in 0.010 seconds