

A060588


If the final two digits of n written in base 3 are the same then this digit, otherwise mod 3sum of these two digits.


3



0, 2, 1, 2, 1, 0, 1, 0, 2, 0, 2, 1, 2, 1, 0, 1, 0, 2, 0, 2, 1, 2, 1, 0, 1, 0, 2, 0, 2, 1, 2, 1, 0, 1, 0, 2, 0, 2, 1, 2, 1, 0, 1, 0, 2, 0, 2, 1, 2, 1, 0, 1, 0, 2, 0, 2, 1, 2, 1, 0, 1, 0, 2, 0, 2, 1, 2, 1, 0, 1, 0, 2, 0, 2, 1, 2, 1, 0, 1, 0, 2, 0, 2, 1, 2, 1, 0, 1, 0, 2, 0, 2, 1, 2, 1, 0, 1, 0, 2, 0, 2, 1, 2, 1, 0
(list;
graph;
refs;
listen;
history;
text;
internal format)



OFFSET

0,2


COMMENTS

From William Walkington, Sep 14 2016: (Start)
With offset 1, the ycoordinates of position vectors from the origin (point 1) to the points numbered 1 to N^2 of the magic tori that display the Agrippa oddorderN magic squares can be expressed as follows: a(n) = ((n1)floor((n1)/N)) mod N.
This generates the ycoordinates of the magic tori that display the Agrippa order3 "Saturn," order5 "Mars," order7 "Venus," order9 "Luna," and higheroddorderN magic squares.
Therefore, if the oddorderN of the torus is 3, then the resulting sequence 0,2,1,2,1,0,1,0,2 represents the ycoordinates of position vectors from the origin (point number 1) to the point numbered 1 to 9 of the magic torus that displays the Agrippa order3 "Saturn" magic square. (End)


REFERENCES

H.C. Agrippa, "De occulta philosophia Libri tres," (1533) translated by "J.F." (John French?) and printed by Moule, London, in 1651, Book II, chapter XXII entitled "Of the tables of the Planets, their vertues,forms, and what Divine names, Intelligencies, and Spirits are set over them."


LINKS

Table of n, a(n) for n=0..104.
H. C. Agrippa, De Occulta Philosophia libri tres (Three books of occult philosophy), Book II, chapter XXII, Digital edition Peterson J.F.
W. Walkington, Magic torus coordinate and vector symmetries.
William Walkington, Agrippa oddorder magic squares
Wikipedia, Agrippa's magic squares.
Index entries for sequences related to final digits of numbers


FORMULA

a(n) = a(n9) = ([n/3]n) mod 3 = A060587(n) mod 3.
a(n) = (n  floor(n/3)) mod 3.  William Walkington, Sep 14 2016


EXAMPLE

a(22)=1 since 22 is written in base 3 as 211 and the final two digits are 1; a(23)=0 since 23 is written in base 3 as 212 and the final two digits are 1 and 2 and 3(1+2)=0.


MATHEMATICA

b3d[n_]:=Module[{d3=Take[IntegerDigits[n, 3], 2]}, If[MatchQ[d3, {x_, x_}], d3[[1]], 3Total[d3]]]; Join[{0, 2, 1}, Array[b3d, 110, 3]] (* Harvey P. Dale, Feb 29 2016 *)
Table[If[MatchQ @@ #, First@ #, Mod[3  Total@ #, 3]] &@ Take[PadLeft[#, 2], 2] &@ IntegerDigits[n, 3], {n, 0, 120}] (* or *)
Table[Mod[n  Floor[n/3], 3], {n, 0, 120}] (* Michael De Vlieger, Sep 14 2016 *)


CROSSREFS

Cf. A060582, A270740.
Sequence in context: A318702 A226519 A066057 * A221167 A286134 A276469
Adjacent sequences: A060585 A060586 A060587 * A060589 A060590 A060591


KEYWORD

base,nonn


AUTHOR

Henry Bottomley, Apr 04 2001


STATUS

approved



