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.

Previous Showing 21-30 of 197 results. Next

A088136 Primes such that sum of first and last digits is prime.

Original entry on oeis.org

11, 23, 29, 41, 43, 47, 61, 67, 83, 89, 101, 131, 151, 181, 191, 211, 223, 229, 233, 239, 241, 251, 263, 269, 271, 281, 283, 293, 401, 409, 419, 421, 431, 433, 439, 443, 449, 457, 461, 463, 467, 479, 487, 491, 499, 601, 607, 617, 631, 641, 647, 661, 677, 691
Offset: 1

Views

Author

Zak Seidov, Sep 20 2003

Keywords

Crossrefs

Cf. A008040 (primes), A010051 (isprime), A000030 (first digit of n), A010879 (last digit of n).

Programs

  • Mathematica
    Select[Prime[Range[400]],PrimeQ[First[IntegerDigits[#]]+ Last[ IntegerDigits[ #]]]&] (* Harvey P. Dale, Jun 23 2017 *)
  • PARI
    select( {is_A088136(p)=isprime(p\10^logint(p,10)+p%10)&&isprime(p)}, primes(99)) \\ M. F. Hasler, Apr 23 2024
  • Python
    from sympy import isprime, primerange
    def ok(p): s = str(p); return isprime(int(s[0]) + int(s[-1]))
    def aupto(limit): return [p for p in primerange(1, limit+1) if ok(p)]
    print(aupto(691)) # Michael S. Branicky, Nov 23 2021
    

A111395 First digit of powers of 5.

Original entry on oeis.org

1, 5, 2, 1, 6, 3, 1, 7, 3, 1, 9, 4, 2, 1, 6, 3, 1, 7, 3, 1, 9, 4, 2, 1, 5, 2, 1, 7, 3, 1, 9, 4, 2, 1, 5, 2, 1, 7, 3, 1, 9, 4, 2, 1, 5, 2, 1, 7, 3, 1, 8, 4, 2, 1, 5, 2, 1, 6, 3, 1, 8, 4, 2, 1, 5, 2, 1, 6, 3, 1, 8, 4, 2, 1, 5, 2, 1, 6, 3, 1, 8, 4, 2, 1, 5, 2, 1, 6
Offset: 0

Views

Author

Almerio A. Castro (almerio.castro(AT)gmail.com), Nov 11 2005

Keywords

Crossrefs

Programs

  • Mathematica
    First[IntegerDigits[#]]&/@(5^Range[0,100]) (* Harvey P. Dale, Jan 13 2015 *)
  • PARI
    a(n) = digits(5^n)[1]; \\ Michel Marcus, Jan 07 2014

Formula

a(n) = A000030(A000351(n)). - Seiichi Manyama, Jul 15 2023

Extensions

a(0)=1 prepended, and more terms from Michel Marcus, Jan 07 2014

A130571 Lexicographically earliest permutation of the natural numbers such that in decimal representation the final digit of each term is distinct from the initial digit of the succeeding term.

Original entry on oeis.org

0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 20, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 30, 23, 24, 25, 26, 27, 28, 29, 31, 32, 33, 40, 34, 35, 36, 37, 38, 39, 41, 42, 43, 44, 50, 45, 46, 47, 48, 49, 51, 52, 53, 54, 55, 60, 56, 57, 58, 59, 61, 62, 63, 64, 65, 66, 70, 67, 68, 69, 71, 72, 73, 74, 75, 76, 77, 80, 78, 79, 81, 82, 83, 84, 85, 86, 87, 88, 90, 89, 100, 91, 92, 93, 94, 95, 96, 97, 98, 99, 101, 200, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 201, 202, 112, 113, 114
Offset: 0

Views

Author

Reinhard Zumkeller, Jun 05 2007

Keywords

Comments

More than the usual number of terms are displayed, in order to show the difference between this and some closely related sequences. - N. J. A. Sloane, Mar 13 2014
A010879(a(n)) <> A000030(a(n+1));
A130572 is the inverse permutation; A130573(n) = a(a(n));
a(A130575(n)) = A130575(n);
see A130576 and A130577 for record values and where they occur.

Crossrefs

For a closely related family of sequences see A239083-A239086, A239136-A239139, A239087-A239090, A239215-A239218, A239235.

A217657 Delete the initial digit in decimal representation of n.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20
Offset: 0

Views

Author

Reinhard Zumkeller, Oct 10 2012

Keywords

Comments

When n - a(n)*10^[log_10 n] >= 10^[(log_10 n) - 1], where [] denotes floor, or when n < 100 and 10|n, n is the concatenation of A000030(n) and a(n) - corrected by Glen Whitney, Jul 01 2022
a(110) = 10 is the first term > 9. The sequence consists of 10 repetitions of 0 (n = 0..9), then 9 repetitions of {0, ..., 9} (n = 10..99), then 9 repetitions of {0, ..., 99} (n = 100..999), and so on. - M. F. Hasler, Oct 18 2017

Crossrefs

Cf. A059995 (drop final digit of n), A000030 (initial digit of n), A202262.

Programs

  • Haskell
    a217657 n | n <= 9    = 0
              | otherwise = 10 * a217657 n' + m where (n', m) = divMod n 10
    
  • Mathematica
    Array[FromDigits@ Rest@ IntegerDigits@ # &, 121, 0] (* Michael De Vlieger, Dec 22 2019 *)
  • PARI
    apply( A217657(n)=n%10^logint(n+!n,10), [0..199]) \\ M. F. Hasler, Oct 18 2017, edited Dec 22 2019
    
  • Python
    def a(n): return 0 if n < 10 else int(str(n)[1:])
    print([a(n) for n in range(121)]) # Michael S. Branicky, Jul 01 2022

Formula

a(n) = 0 if n <= 9, otherwise 10*a(floor(n/10)) + n mod 10.
a(n) = n mod 10^floor(log_10(n)), a(0) = 0. - M. F. Hasler, Oct 18 2017

Extensions

Data extended to include the first terms larger than 9, by M. F. Hasler, Dec 22 2019

A073729 Concatenation of initial and final digits of n in decimal representation.

Original entry on oeis.org

11, 22, 33, 44, 55, 66, 77, 88, 99, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69
Offset: 1

Views

Author

Reinhard Zumkeller, Aug 05 2002

Keywords

Comments

10 <= a(n) <= 99; a(a(n))=a(n).

Examples

			a(12321)=11; a(3210123)=33; a(59387)=57; a(8923)=83.
		

Crossrefs

Programs

  • Haskell
    a073729 n = 10 * a000030 n + a010879 n  -- Reinhard Zumkeller, Dec 31 2012
  • Mathematica
    Table[FromDigits[{First[x = IntegerDigits[n]], Last[x]}], {n, 69}] (* Jayanta Basu, Jul 08 2013 *)
  • PARI
    a(n)=10*digits(n)[1]+n%10 \\ Charles R Greathouse IV, Dec 28 2012
    

Formula

a(n) = A000030(n)*10 + A010879(n).

A105501 Numbers n such that 1 is the leading digit of the n-th Fibonacci number in decimal representation.

Original entry on oeis.org

1, 2, 7, 12, 17, 21, 22, 26, 27, 31, 36, 40, 41, 45, 46, 50, 55, 60, 64, 65, 69, 70, 74, 79, 84, 88, 89, 93, 94, 98, 103, 107, 108, 112, 113, 117, 122, 127, 131, 132, 136, 137, 141, 146, 151, 155, 156, 160, 161, 165, 170, 174, 175, 179, 180, 184, 189, 194, 198, 199
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 11 2005

Keywords

Comments

A008963(a(n)) = 1; A105511(a(n)) = A105511(a(n) - 1) + 1.

Examples

			a(10)=31: A008963(31) = A000030(A000045(31)) =
A000030(1346269) = 1.
		

Crossrefs

Programs

  • Maple
    filter:= proc(n) local t;
      t:= combinat:-fibonacci(n);
      t < 2*10^ilog10(t)
    end proc:
    select(filter, [$1..200]); # Robert Israel, May 02 2018
  • Mathematica
    fQ[n_] := IntegerDigits[Fibonacci[n]][[1]] == 1; Select[Range@200, fQ] (* Robert G. Wilson v, May 02 2018 *)
  • PARI
    is(n)=digits(fibonacci(n))[1]==1 \\ Charles R Greathouse IV, Oct 07 2016

Formula

a(n) ~ kn by the equidistribution theorem, where k = log(10)/log(2) = 3.321928.... - Charles R Greathouse IV, Oct 07 2016

A105511 Number of times 1 is the leading digit of the first n+1 Fibonacci numbers in decimal representation.

Original entry on oeis.org

0, 1, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 7, 7, 7, 7, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 11, 11, 11, 11, 12, 13, 13, 13, 13, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 18, 18, 18, 18, 19, 20, 20, 20, 20, 21, 22, 22, 22, 22, 23, 23, 23, 23, 23, 24
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 11 2005

Keywords

Crossrefs

Programs

  • Mathematica
    Accumulate[Table[If[IntegerDigits[Fibonacci[n]][[1]] == 1, 1, 0], {n, 0, 100}]] (* Amiram Eldar, Jan 12 2023 *)
  • PARI
    (leadingdigit(n, b=10) = n \ 10^logint(n, b));
    (isok(n) = leadingdigit(fibonacci(n))==1);
    (lista(n)=my(a=vector(1+n), r=0); for (i=1, n, r+=isok(i); a[1+i]=r); a) \\ Winston de Greef, Mar 17 2023

Formula

a(n) = #{k: A008963(k) = 1 and 0<=k<=n};
a(A105501(n)) = a(A105501(n) - 1) + 1;
n = a(n) + A105512(n) + A105513(n) + A105514(n) + A105515(n) + A105516(n) + A105517(n) + A105518(n) + A105519(n).
a(n) ~ log_10(2) * n. - Amiram Eldar, Jan 12 2023

A105519 Number of times 9 is the leading digit of the first n+1 Fibonacci numbers in decimal representation.

Original entry on oeis.org

0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5
Offset: 0

Views

Author

Reinhard Zumkeller, Apr 11 2005

Keywords

Crossrefs

Programs

  • Mathematica
    Table[If[First[IntegerDigits[Fibonacci[n]]]==9,1,0],{n,0,110}]// Accumulate (* Harvey P. Dale, Nov 27 2018 *)
  • PARI
    (leadingdigit(n, b=10) = n \ 10^logint(n, b));
    (isok(n) = leadingdigit(fibonacci(n))==9);
    (lista(n)=my(a=vector(1+n), r=0); for (i=1, n, r+=isok(i); a[1+i]=r); a) \\ Winston de Greef, Mar 18 2023

Formula

a(n) = #{k: A008963(k) = 9 and 0<=k<=n};
a(A105509(n)) = a(A105509(n) - 1) + 1;
n = A105511(n) + A105512(n) + A105513(n) + A105514(n) + A105515(n) + A105516(n) + A105517(n) + A105518(n) + a(n).
a(n) ~ (1 - log_10(9)) * n. - Amiram Eldar, Jan 12 2023

A076654 Smallest natural number not a multiple of 10, not occurring earlier and starting with the end of the previous term.

Original entry on oeis.org

1, 11, 12, 2, 21, 13, 3, 31, 14, 4, 41, 15, 5, 51, 16, 6, 61, 17, 7, 71, 18, 8, 81, 19, 9, 91, 101, 102, 22, 23, 32, 24, 42, 25, 52, 26, 62, 27, 72, 28, 82, 29, 92, 201, 103, 33, 34, 43, 35, 53, 36, 63, 37, 73, 38, 83, 39, 93, 301, 104, 44, 45, 54, 46, 64, 47, 74, 48, 84, 49, 94
Offset: 1

Views

Author

Amarnath Murthy, Oct 28 2002

Keywords

Crossrefs

Programs

  • Haskell
    import Data.List (delete)
    a076654 n = a076654_list !! (n-1)
    a076654_list = f a067251_list 1 where
      f xs z = g xs where
        g (y:ys) = if a000030 y == mod z 10 then y : f (delete y xs) y else g ys
    -- Reinhard Zumkeller, Aug 15 2015
  • Maple
    startsWith := proc(n,dig) local nshft ; nshft := n ; while nshft >= 10 do nshft := floor(nshft/10) ; od ; if dig = nshft then RETURN(true) ; else RETURN(false) ; fi ; end: A076654 := proc(nmax) local candid,a; a := [1] ; while nops(a) < nmax do candid := 2 ; while not startsWith(candid,op(-1,a) mod 10) or candid mod 10 = 0 or candid in a do candid := candid+1 ; od ; a := [op(a),candid] ; od ; RETURN(a) ; end: a := A076654(200) : for n from 1 to nops(a) do printf("%d,",op(n,a)) ; od ; # R. J. Mathar, Nov 12 2006

Formula

A000030(a(n+1)) = A010879(a(n)). - Reinhard Zumkeller, Aug 15 2015

Extensions

More terms from R. J. Mathar, Nov 12 2006

A105502 Numbers m such that 2 is the leading digit of the m-th Fibonacci number in decimal representation.

Original entry on oeis.org

3, 8, 13, 18, 23, 32, 37, 42, 47, 51, 56, 61, 66, 75, 80, 85, 90, 99, 104, 109, 114, 118, 123, 128, 133, 142, 147, 152, 157, 166, 171, 176, 185, 190, 195, 200, 209, 214, 219, 224, 233, 238, 243, 252, 257, 262, 267, 276, 281, 286, 291, 295, 300, 305, 310, 319
Offset: 1

Views

Author

Reinhard Zumkeller, Apr 11 2005

Keywords

Comments

A008963(a(n)) = 2; A105512(a(n)) = A105512(a(n) - 1) + 1.

Examples

			a(10)=51: A008963(51) = A000030(A000045(51)) = A000030(20365011074) = 2.
		

Crossrefs

Programs

Formula

a(n) ~ kn by the equidistribution theorem, where k = log(10)/(log(3) - log(2)) = 5.67887.... - Charles R Greathouse IV, Oct 07 2016
Previous Showing 21-30 of 197 results. Next