login
This site is supported by donations to The OEIS Foundation.

 

Logo


Hints
(Greetings from The On-Line Encyclopedia of Integer Sequences!)
A260487 Given a number n with k digits d_i, enumerate the positions of the digits starting from LSD = 1 to MSD = k. Sequence lists the numbers such that Sum_{i=1..k} d_i/i and Sum_{i=1..k} i/d_i are equal and integer. 1
1, 21, 321, 2612, 4321, 52612, 54321, 352342, 352622, 352641, 354612, 358312, 358611, 652612, 654321, 7352342, 7352622, 7352641, 7354612, 7358312, 7358611, 7652612, 7654321, 27155485, 27351684, 27353616, 27355325, 27457722, 27457741, 27655315, 27851554, 27953333 (list; graph; refs; listen; history; text; internal format)
OFFSET

1,2

COMMENTS

The sums for the listed terms are 1, 2, 3, 5, 4, 6, 5, 7, 7, 7, 7, 7, 7, 7, 6, 8, 8, 8, 8, 8, 8, 8, 7, 14, 13, 12, 11, 10, 10, 11, 12, 10, ...

2612 is the only number where no i/d_i (or d_i/i) is ever equal to 1.

The b-file lists all the terms <= 10^10.

From 7352342 on, d_7 = 7.

There can't be any terms >= 10^10. For an m-digit number, if p is the largest prime <= m and p >= 11, by Bertrand's postulate the first sum has exactly one term with denominator p and can't be an integer. - Robert Israel, Aug 14 2015

LINKS

Paolo P. Lava, Table of n, a(n) for n = 1..798

EXAMPLE

For 2612 we have that 2/1 + 1/2 + 6/3 + 2/4 = 1/2 + 2/1 + 3/6 + 4/2 = 5;

For 358611 we have that 1/1 + 1/2 + 6/3 + 8/4 + 5/5 + 3/6 = 1/1 + 2/1 +3/6 + 4/8 + 5/5 + 6/3 = 7.

MAPLE

with(numtheory):P:=proc(q) local a, b, c, k, ok, n;

for n from 1 to q do a:=n; b:=0; c:=0; ok:=1;

for k from 1 to ilog10(n)+1 do if (a mod 10)=0 then ok:=0; break;

else b:=b+(a mod 10)/k; c:=c+k/(a mod 10); a:=trunc(a/10); fi; od;

if ok=1 then if b=c and type(b, integer) then print(n); fi; fi;

od; end: P(10^9);

MATHEMATICA

fQ[n_] := Block[{a, b, d = Reverse@ IntegerDigits@ n, k = IntegerLength@ n}, a = Sum[d[[i]]/i, {i, k}]; b = Sum[i/d[[i]], {i, k}]; And[a == b, IntegerQ@ a]]; Select[Select[Range@ 100000, Last@ DigitCount@ # == 0 &], fQ] (* Michael De Vlieger, Aug 06 2015 *)

PROG

(PARI) isok(n) = my(d = digits(n)); vecmin(d) && (sd = sum(k=1, #d, d[k]/(#d-k+1))) && (denominator(sd)==1) && (sd == sum(k=1, #d, k/d[#d-k+1])); \\ Michel Marcus, Aug 14 2015

CROSSREFS

Cf. A260274, A260275, A260385, A260386.

Sequence in context: A016315 A113531 A069572 * A057138 A104759 A138793

Adjacent sequences:  A260484 A260485 A260486 * A260488 A260489 A260490

KEYWORD

nonn,base,fini,full

AUTHOR

Paolo P. Lava, Jul 27 2015

STATUS

approved

Lookup | Welcome | Wiki | Register | Music | Plot 2 | Demos | Index | Browse | More | WebCam
Contribute new seq. or comment | Format | Style Sheet | Transforms | Superseeker | Recent
The OEIS Community | Maintained by The OEIS Foundation Inc.

License Agreements, Terms of Use, Privacy Policy. .

Last modified September 18 07:58 EDT 2019. Contains 327168 sequences. (Running on oeis4.)