|
|
A260704
|
|
Number of pairs of distinct divisors of A260703(n) having the property that the reversal of one is equal to the other.
|
|
3
|
|
|
1, 1, 2, 1, 2, 1, 1, 1, 3, 1, 1, 1, 1, 3, 1, 1, 1, 1, 2, 3, 1, 2, 1, 2, 2, 2, 1, 2, 1, 1, 4, 1, 2, 1, 1, 2, 2, 1, 2, 2, 1, 2, 1, 3, 1, 1, 1, 1, 1, 2, 4, 1, 1, 2, 2, 3, 1, 1, 1, 2, 2, 1, 4, 1, 1, 1, 2, 1, 1, 4, 1, 1, 1, 2, 2, 2, 1, 3, 1, 2, 3, 2, 1, 3, 2, 1, 3
(list;
graph;
refs;
listen;
history;
text;
internal format)
|
|
|
OFFSET
|
1,3
|
|
COMMENTS
|
A260703: numbers having at least two divisors such that the reversal of one is equal to the other.
|
|
LINKS
|
|
|
EXAMPLE
|
a(9)=3 because A260703(9) = 336 and the set of the divisors of 336, {1, 2, 3, 4, 6, 7, 8, 12, 14, 16, 21, 24, 28, 42, 48, 56, 84, 112, 168, 336} contains 3 pairs (12, 21), (24, 42) and (48, 84) with the property: 21 = reversal(12), 42 = reversal(24) and 84 = reversal(48).
|
|
MAPLE
|
with(numtheory):nn:=5000:
for n from 1 to nn do:
it:=0:d:=divisors(n):d0:=nops(d):
for i from 1 to d0 do:
dd:=d[i]:y:=convert(dd, base, 10):n1:=length(dd):
s:=sum('y[j]*10^(n1-j)', 'j'=1..n1):
for k from i+1 to d0 do:
if s=d[k]
then
it:=it+1:
else fi:
od:
od:
if it>0
then
printf(`%d, `, it):
else fi:
od:
|
|
MATHEMATICA
|
f[n_] := Block[{d = Select[Divisors@n, IntegerLength@# > 1 &], palQ, r}, palQ[x_] := Reverse@ # == # &@ IntegerDigits@ x; r = FromDigits@ Reverse@ IntegerDigits@ # & /@ d; Length@ Select[Intersection[d, r], ! palQ@ # &]/2]; f /@ Range@ 3000 /. 0 -> Nothing (* Michael De Vlieger, Nov 17 2015 *)
|
|
CROSSREFS
|
|
|
KEYWORD
|
nonn,base
|
|
AUTHOR
|
|
|
STATUS
|
approved
|
|
|
|