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.

Showing 1-2 of 2 results.

A079847 Smallest multiple of n in which the string of digits of n occurs after (n-1) most significant digits.

Original entry on oeis.org

1, 12, 123, 1004, 10005, 100026, 1000027, 10000008, 100000089, 10000000010, 100000000111, 1000000000212, 10000000000913, 100000000000614, 1000000000000215, 10000000000000016, 100000000000000517, 1000000000000000818, 10000000000000001719, 100000000000000000020
Offset: 1

Views

Author

Amarnath Murthy, Feb 18 2003

Keywords

Examples

			a(4) = 1004, 4 occurs as the 4th digit from the left. a(10) = 10000000010. ('10') occurs after 9 digits.
		

Crossrefs

Cf. A245470.

Programs

  • Mathematica
    a079847[n_] := 10^(n - 1 + Floor[Log10[n]]) + (NestWhile[# + 1 &, 0, Mod[10^(n - 1 + Floor[Log10[n]]) + # 10^(1 + Floor[Log10[n]]), n] != 0 &]) 10^(1 + Floor[Log10[n]]) + n; a079847[1] = 1; Table[a079847[n], {n, 20}] (* L. Edson Jeffery, Jul 16 2014 *)
  • PARI
    numdig(n)=my(r=1);while(n>=10,n\=10;r++);r
    a(n) = my(k,m);if(n<=1,n,k=10^numdig(n);m=10^(n-2);(-m%(n\gcd(n,k))+m)*k+n) \\ Franklin T. Adams-Watters, Jul 25 2014

Formula

For n>1, let d be the number of digits in n, and n' = n/gcd(n,10^d). Then a(n) = (10^{n-2}+mod(-(10^{n-2}),n')) * 10^d + n. (The mod function used here always returns a nonnegative result; e.g., mod(-2,7) = 5.) - Franklin T. Adams-Watters, Jul 25 2014

Extensions

More terms from Antonio G. Astudillo (afg_astudillo(AT)lycos.com), Jul 04 2003

A245472 Number of composite Lucas numbers between the prime Lucas numbers A005479(n) and A005479(n+1).

Original entry on oeis.org

0, 1, 0, 1, 0, 2, 1, 2, 0, 1, 11, 5, 3, 5, 5, 7, 9, 7, 33, 199, 39, 149, 109, 3, 245, 233, 263, 3425, 5, 1057, 1889, 725, 2223, 1559, 1711, 485, 5019, 15979, 1329, 7727, 6661, 4833, 25667, 8177, 4973, 45233, 8033, 11429, 23567, 10111, 9465, 141625, 43139, 56175
Offset: 1

Views

Author

Michel Lagneau, Jul 23 2014

Keywords

Examples

			a(1)=0 because A005479(1)= 2, A005479(2)= 3 and there are no composite Lucas number between 2 and 3 (the number 1 is not composite).
a(6)=2 because A005479(6)= 47, A005479(7)= 199 and there are 2 composite Lucas numbers between 47 and 199: 76 = 2^2*19 and 123 = 3*41.
		

Crossrefs

Programs

  • Maple
    with(combinat,fibonacci):with(numtheory):i:=0:a:=n->2*fibonacci(n-1)+fibonacci(n):for n from 3 to 100 do:if type (a(n), prime)=true then printf(`%d, `, i):i:=0:else i:=i+1:fi:od:

Formula

a(n) = A001606(n+1) - A001606(n) - 1, for n > 1.
Showing 1-2 of 2 results.