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-10 of 30 results. Next

A103609 Fibonacci numbers repeated (cf. A000045).

Original entry on oeis.org

0, 0, 1, 1, 1, 1, 2, 2, 3, 3, 5, 5, 8, 8, 13, 13, 21, 21, 34, 34, 55, 55, 89, 89, 144, 144, 233, 233, 377, 377, 610, 610, 987, 987, 1597, 1597, 2584, 2584, 4181, 4181, 6765, 6765, 10946, 10946, 17711, 17711, 28657, 28657, 46368, 46368, 75025, 75025, 121393
Offset: 0

Views

Author

Roger L. Bagula, Mar 24 2005

Keywords

Comments

The usual policy in the OEIS is not to include such "doubled" sequences. This is an exception. - N. J. A. Sloane
The Gi2 sums, see A180662, of triangle A065941 equal the terms of this sequence without the two leading zeros. - Johannes W. Meijer, Aug 16 2011

Crossrefs

Partial sums: A094707.

Programs

  • Magma
    [Fibonacci(Floor(n/2)): n in [0..60]]; // G. C. Greubel, Oct 22 2024
    
  • Maple
    A103609 := proc(n): combinat[fibonacci](floor(n/2)) ; end proc: seq(A103609(n), n=0..52); # Johannes W. Meijer, Aug 16 2011
  • Mathematica
    a[0] = 0; a[1] = 0; a[2] = 1; a[3] = 1; a[n_Integer?Positive] := a[n] = a[n - 2] + a[n - 4]; aa = Table[a[n], {n, 0, 200}]
    Join[{0, 0}, LinearRecurrence[{0, 1, 0, 1}, {1, 1, 1, 1}, 60]] (* Vincenzo Librandi, Jan 19 2016 *)
    With[{fibs=Fibonacci[Range[0,30]]},Riffle[fibs,fibs]] (* Harvey P. Dale, Jul 11 2025 *)
  • PARI
    a(n)=fibonacci(n\2) \\ Charles R Greathouse IV, Oct 07 2015
    
  • PARI
    my(x='x+O('x^50)); Vec(x^2*(1+x)/(1-x^2-x^4)) \\ G. C. Greubel, May 01 2017
    
  • SageMath
    [fibonacci(n//2) for n in range(61)] # G. C. Greubel, Oct 22 2024

Formula

a(n) = a(n-2) + a(n-4).
G.f.: x^2*(1+x)/(1-x^2-x^4). - R. J. Mathar, Sep 27 2008
a(n) = A000045(floor(n/2)). - Johannes W. Meijer, Aug 16 2011

Extensions

Edited by N. J. A. Sloane, Dec 01 2006
Incorrect formula deleted by Johannes W. Meijer, Aug 16 2011

A031877 Nontrivial reversal numbers (numbers which are integer multiples of their reversals), excluding palindromic numbers and multiples of 10.

Original entry on oeis.org

8712, 9801, 87912, 98901, 879912, 989901, 8799912, 9899901, 87128712, 87999912, 98019801, 98999901, 871208712, 879999912, 980109801, 989999901, 8712008712, 8791287912, 8799999912, 9801009801, 9890198901, 9899999901, 87120008712, 87912087912, 87999999912
Offset: 1

Views

Author

Keywords

Comments

The terms of this sequence are sometimes called palintiples.
All terms are of the form 87...12 = 4*21...78 or 98...01 = 9*10...89. [This was proved by Hoey, 1992. - N. J. A. Sloane, Oct 19 2014] More precisely, they are obtained from concatenated copies of either 8712 or 9801, with 9's inserted "in the middle of" these and/or 0's inserted between the copies these, in a symmetrical way. A008919 lists the reversals, but not in the same order, e.g., R(a(2)) < R(a(1)). - M. F. Hasler, Aug 18 2014
There are 2*Fibonacci(floor((n-2)/2)) terms with n digits (this is A214927 or essentially twice A103609). - Ray Chandler, Oct 11 2017

References

  • W. W. R. Ball and H. S. M. Coxeter. Mathematical Recreations and Essays (1939, page 13); 13th ed. New York: Dover, pp. 14-15, 1987.
  • G. H. Hardy, A Mathematician's Apology (Cambridge Univ. Press, 1940, reprinted 2000), pp. 104-105 (describes this problem as having "nothing in [it] which appeals much to a mathematician.").

Crossrefs

See A008919 for reversals (this is the main entry for the problem).
Union of A222814 and A222815.
Subsequence of A118959.

Programs

  • Haskell
    a031877_list = [x | x <- [1..], x `mod` 10 > 0,
                        let x' = a004086 x, x' /= x && x `mod` x' == 0]
    -- Reinhard Zumkeller, Jul 15 2013
    
  • Mathematica
    fQ[n_] := Block[{id = IntegerDigits@n}, Mod[n, FromDigits@ Reverse@id] == 0 && n != FromDigits@ Reverse@ id && Mod[n, 10] > 0]; k = 1; lst = {}; While[k < 10^9, If[fQ@k, AppendTo[lst, k]; Print@k]; k++ ]; lst (* Robert G. Wilson v, Jun 11 2010 *)
    okQ[t_]:=t==Reverse[t]&&First[t]!=0&&Min[Length/@Split[t]]>1; Sort[Flatten[ {(4*198)#,(9*99)#}&/@Flatten[Table[FromDigits/@Select[Tuples[ {0,1},n], okQ],{n,12}]]]] (* Harvey P. Dale, Jul 03 2013 *)
  • PARI
    is_A031877(n)={n%10 && n%A004086(n)==0 && n>A004086(n)} \\ M. F. Hasler, Aug 18 2014
    
  • Python
    A031877 = []
    for n in range(1,10**7):
        if n % 10:
            s1 = str(n)
            s2 = s1[::-1]
            if s1 != s2 and not n % int(s2):
                A031877.append(n) # Chai Wah Wu, Sep 05 2014

Formula

a(n) = A004086(a(n))*[9/(a(n)%10)], where [...]=9 if a(n) ends in "1" and [...]=4 if a(n) ends in "2". - M. F. Hasler, Aug 18 2014

Extensions

More terms from Jud McCranie, Aug 15 2001
More terms from Sam Mathers, Aug 18 2014

A008919 Numbers k such that k written backwards is a nontrivial multiple of k.

Original entry on oeis.org

1089, 2178, 10989, 21978, 109989, 219978, 1099989, 2199978, 10891089, 10999989, 21782178, 21999978, 108901089, 109999989, 217802178, 219999978, 1089001089, 1098910989, 1099999989, 2178002178, 2197821978, 2199999978, 10890001089
Offset: 1

Views

Author

Keywords

Comments

There are 2*Fibonacci(floor((n-2)/2)) terms with n digits (this is A214927 or essentially twice A103609). - N. J. A. Sloane, Mar 20 2013
All terms are made of "symmetric" concatenations of 1089 and/or 2178, with an arbitrary numbers of 9's inserted in the middle of these and 0's inserted between them. See A031877 for the reversals and further information: union of the two, sequences "made of" 1089 or 2178 only. - M. F. Hasler, Jun 23 2019
Also: 99 times A061852: numbers that are palindromic, have only digits in {0, 1} or in {0, 2}, and no isolated ("single") digit. - M. F. Hasler, Oct 17 2022

References

  • W. W. R. Ball and H. S. M. Coxeter. Mathematical Recreations and Essays (1939, page 13); 13th ed. New York: Dover, pp. 14-15, 1987.
  • Gardiner, Anthony, and A. D. Gardiner. Discovering mathematics: The art of investigation. Oxford University Press, 1987.
  • G. H. Hardy, A Mathematician's Apology (Cambridge Univ. Press, 1940, reprinted 2000), pp. 104-105 (describes this problem as having "nothing in [it] which appeals much to a mathematician").
  • D. Wells, The Penguin Dictionary of Curious and Interesting Numbers. Penguin Books, NY, 1986.

Crossrefs

Cf. A001232 (9k = R(k)), A004086 (R(n): reverse), A008918 (4k = R(k)), A214927, A103609 (Fibonacci([n/2])). Reversals are in A031877.

Programs

  • Haskell
    a008919 n = a008919_list !! (n-1)
    a008919_list = [x | x <- [1..],
                        let (x',m) = divMod (a004086 x) x, m == 0, x' > 1]
    -- Reinhard Zumkeller, Feb 03 2012
    
  • Mathematica
    Reap[ Do[ If[ Reverse[ IntegerDigits[n]] == IntegerDigits[4*n], Print[n]; Sow[n]]; If[ Reverse[ IntegerDigits[n + 11]] == IntegerDigits[9*(n + 11)], Print[n + 11]; Sow[n + 11]], {n, 78, 2*10^10, 100}]][[2, 1]] (* Jean-François Alcover, Jun 19 2012, after David W. Wilson, assuming n congruent to 78 or 89 mod 100 *)
    okQ[t_]:=t==Reverse[t]&&First[t]!=0&&Min[Length/@Split[t]]>1; Sort[ Flatten[ {99#, 198#}&/@Flatten[Table[FromDigits/@Select[Tuples[ {0,1},n], okQ],{n,10}]]]] (* Harvey P. Dale, Jul 03 2013 *)
  • PARI
    is_A008919(n,r=A004086(n))={n>r && n%r==0} \\ M. F. Hasler, Jun 23 2019

Formula

If reverse(n) = k*n in base 10, then k = 1, 4 or 9 [Klosinski and Smolarski]. Hence A008919 is the union of A001232 and A008918. - David W. Wilson
a(n) = 99*A061852(n). - M. F. Hasler, Oct 17 2022

Extensions

Corrected and extended by David W. Wilson Aug 15 1996, Dec 15 1997

A091079 Numbers n which when converted to base 5, reversed and converted back to base 10 yield a number m such that n mod m = 0. Cases which are trivial or result in digit loss are excluded.

Original entry on oeis.org

16, 96, 416, 496, 576, 2016, 2496, 2976, 10016, 10416, 12096, 12496, 14976, 50016, 52416, 60096, 62496, 74976, 250016, 252016, 260416, 262416, 300096, 302096, 310496, 312496, 360576, 374976, 1250016, 1262016, 1300416, 1312416, 1500096, 1512096, 1550496
Offset: 1

Views

Author

Chuck Seggelin, Dec 18 2003

Keywords

Comments

Trivial cases are those numbers which upon conversion result in a number which is palindromic (m = reverse(m)), or a palindrome plus trailing zeros such that m = reverse(m)*10^z where z=number of lost zeros. Nontrivial digit loss occurs when a converted number has trailing zeros that drop off when the number is reversed.
n/m must be either 2 or 4. - Robert Israel, Apr 22 2021

Examples

			a(1) = 16 because: 16 in base 5 is 31; 31 reversed is 13; 13 converted back to base 10 is 8 and 16 mod 8 = 0.
		

Crossrefs

Cf. A091077 (same in base 3), A091078 (base 4), A091080 (base 6), A091081 (base 7), A091082 (base 8), A091083 (base 9), A031877 (base 10).
See also A222816, A214927.

Programs

  • Maple
    F:= proc(d) local eq,m,R;
      R:= NULL;
      for m in [2,4] do
        eq:= m*add(a[i]*5^i,i=0..d)-add(a[d-i]*5^i,i=0..d);
        R:= R, F1(eq,[],d);
      od;
    sort([R]);
    end proc:
    F1:= proc(eq,A,d) local V,s,e1,i1,i2,vlo,R,v1,v2,Vp,Vm,emax,emin;
          V:= indets(eq);
          if nops(V) = 0 then
             if eq = 0 then subs(A,add(a[d-i]*5^i,i=0..d))
             else NULL
             fi
          elif nops(V) = 1 then
             s:= solve(eq,V[1]);
             if member(s,[$0..4]) then
                subs([op(A),V[1]=s],add(a[d-i]*5^i,i=0..d));
             fi
          else
              Vp,Vm:= selectremove(t -> coeff(eq,t)>0, V);
             emax:= subs(map(`=`,Vp,4),map(`=`,Vm,0),eq);
             if emax < 0 then return NULL fi;
             emin:= subs(map(`=`,Vp,0),map(`=`,Vm,4),eq);
             if emin > 0 then return NULL fi;
               e1:= eq mod 5;
             V:= indets(e1);
             if nops(V) = 0 then procname(e1/5,A,d)
             elif nops(V) = 1 then
               s:= msolve(e1, 5);
               procname(subs(s,eq)/5, [op(A),op(s)], d)
             else
               i1:= op(1,V[1]); i2:= op(1,V[2]);
               if i1 = 0 or i2 = 0 then vlo:= 1 else vlo:= 0 fi;
               R:= NULL;
               for v1 from vlo to 4 do
                 s:= msolve(eval(e1, a[i1]=v1),5);
                 R:= R, procname(subs(a[i1]=v1, op(s), eq)/5, [op(A),a[i1]=v1,op(s)],d)
               od;
               R
          fi fi
    end proc:
    seq(op(F(d)),d=1..8); # Robert Israel, Apr 22 2021
  • PARI
    /* See A091077 and use PARI script with b=5 */

Extensions

More terms from Michel Marcus, Oct 10 2014

A078477 Number of rational knots with n crossings and unknotting number = 1 (chiral pairs counted only once).

Original entry on oeis.org

1, 1, 1, 3, 3, 6, 7, 15, 15, 30, 31, 63, 63, 126, 127, 255, 255, 510, 511, 1023, 1023, 2046, 2047, 4095, 4095, 8190, 8191, 16383, 16383, 32766, 32767, 65535, 65535, 131070, 131071, 262143, 262143, 524286, 524287, 1048575, 1048575, 2097150, 2097151
Offset: 3

Views

Author

Ralf Stephan, Jan 03 2003

Keywords

Comments

From Alexander Adamchuk, Nov 16 2009: (Start)
For n>1 a(2n+1) = 2^(n-1) - 1 = A000225(n-1).
For n>1 a(4n) = a(4n+1) - 1 = 2^(2n-1) - 2.
For n>0 a(4n+2) = a(4n+3) = 2^(2n) - 1. (End)

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[(2 x^7 + 2 x^6 - x^5 + x^3 - x^2 + x + 1) / ((x-1) (x+1) (x^2+1) (2 x^2-1)), {x, 0, 50}], x] (* Vincenzo Librandi, May 17 2013 *)
  • PARI
    Vec(x^3*(1+x-x^2+x^3-x^5+2*x^6+2*x^7)/((1-x)*(1+x)*(1+x^2)*(1-2*x^2)) + O(x^60)) \\ Colin Barker, Dec 26 2015

Formula

G.f.: x^3*(1+x-x^2+x^3-x^5+2*x^6+2*x^7) / ((1-x)*(1+x)*(1+x^2)*(1-2*x^2)).
a(n) = 2*a(n-2)+a(n-4)-2*a(n-6) for n>10. - Colin Barker, Dec 26 2015

A222810 Number of n-digit numbers N with distinct digits such that the reversal of N divides N.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Mar 10 2013

Keywords

Comments

Suggested by A214927.
a(n)=0 for all n > 6.

Examples

			Solutions with 1 through 6 digits:
[1, 2, 3, 4, 5, 6, 7, 8, 9],
[10, 20, 30, 40, 50, 60, 70, 80, 90],
[510, 540, 810],
[5610, 5940, 8712, 8910, 9801],
[65340, 87120, 87912],
[659340, 879120],
		

Crossrefs

For the actual numbers see A223080.

Programs

  • Python
    import collections
    col = []
    count = 0
    for n in range(0, 9):
        a = 10**n
        stop = 10**(n+1)
        while a < stop:
            b = str(a)
            c = list(b)
            d = c[::-1]
            e = int("".join(c))
            f = int("".join(d))
            counter = collections.Counter(c)
            if e % f == 0 and counter.most_common(1)[0][1] == 1:
                count += 1
                col.append(a)
            a += 1
        print(n+1, " digits: ", count, " elements: ", col)
        count = 0
        col = []
    # David Consiglio, Jr., Dec 04 2014

Extensions

a(8)-a(9) from David Consiglio, Jr., Dec 04 2014

A226916 Number of (17,11)-reverse multiples with n digits.

Original entry on oeis.org

0, 0, 0, 0, 1, 0, 0, 1, 1, 1, 2, 1, 2, 2, 3, 3, 5, 4, 7, 6, 10, 9, 15, 13, 22, 19, 32, 28, 47, 41, 69, 60, 101, 88, 148, 129, 217, 189, 318, 277, 466, 406, 683, 595, 1001, 872, 1467, 1278, 2150, 1873, 3151, 2745, 4618, 4023, 6768, 5896, 9919, 8641, 14537, 12664, 21305, 18560, 31224, 27201, 45761
Offset: 0

Views

Author

N. J. A. Sloane, Jun 24 2013

Keywords

Comments

Comment from Emeric Deutsch, Aug 21 2016 (Start):
Given an increasing sequence of positive integers S = {a0, a1, a2, ... }, let
F(x) = x^{a0} + x^{a1} + x^{a2} + ... .
Then the g. f. for the number of palindromic compositions of n with parts in S is (see Hoggatt and Bicknell, Fibonacci Quarterly, 13(4), 1975):
(1 + F(x))/(1 - F(x^2))
Playing with this, I have found easily that
1. number of palindromic compositions of n into {3,4,5,...} = A226916(n+4);
2. number of palindromic compositions of n into {1,4,7,10,13,...} = A226916(n+6);
3. number of palindromic compositions of n into {1,4} = A226517(n+10);
4. number of palindromic compositions of n into {1,5} = A226516(n+11).
(End)

Crossrefs

Programs

  • Mathematica
    CoefficientList[Series[x^4 (1 - x^2 + x^3 + x^4) / (1 - x^2 - x^6), {x, 0, 70}], x] (* Vincenzo Librandi, Jul 16 2013 *)

Formula

G.f.: x^4*(1+x)*(1-x+x^3)/(1-x^2-x^6).
a(2n) = A058278(n-1). a(2n+1)=A000930(n-3). - R. J. Mathar, Dec 13 2022

A222817 Irregular triangle read by rows: row n gives list of nontrivial reverse multipliers for base n.

Original entry on oeis.org

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

Views

Author

N. J. A. Sloane, Mar 13 2013

Keywords

Comments

If there is a number m such that the reversal of m in base n is c times m, then c is called a reverse multiplier for n. For example, 2 is a reverse multiplier for base n=5, since 8 (base 10) = 13 (base 5), and 2*8 = 16 (base 10) = 31 (base 5).
The trivial reverse multiplier 1 is excluded.
The last entry in each row is n-1; the number of terms in row n is A222819(n).

Examples

			Triangle begins:
  2,
  3,
  2,4,
  2,5,
  3,6,
  2,3,5,7,
  2,4,8,
  4,9,
  2,3,5,7,10,
  2,3,5,11,
  5,6,12,
  2,3,4,6,9,13,
  2,3,4,7,11,14,
  3,7,15,
  ...
		

Crossrefs

See A214927 for other cross-references.

A061851 Digital representation of n contains only 1's and 0's, is palindromic and contains no singleton 1's or 0's.

Original entry on oeis.org

11, 111, 1111, 11111, 110011, 111111, 1100011, 1111111, 11000011, 11100111, 11111111, 110000011, 111000111, 111111111, 1100000011, 1100110011, 1110000111, 1111001111, 1111111111, 11000000011, 11001110011, 11100000111, 11110001111, 11111111111, 110000000011, 110001100011
Offset: 1

Views

Author

Henry Bottomley, May 10 2001

Keywords

Comments

The terms can be constructed by gluing together terms from A355280 with their reversal as follows: The terms with odd length L = 2k-1 are given from the k-digit terms of A355280 by replacing the last digit with the reversal of the term. (Equivalently, concatenate with the reversal and delete one of the middle digits.) Terms with an even number L = 2k of digits are given as concatenation(m, reverse(m)) = m*10^L(m) + A004086(m) where m runs over the k-digit terms from A355280, and the (k-1)-digit terms with the 1's complement of the last digit appended. This explains the formula given in CROSSREFS for the number of terms of given length. - M. F. Hasler, Oct 17 2022

Crossrefs

Number of terms with k digits is Fibonacci(floor(k/2)) = A000045(A004526(k)).
Union of this sequence and twice this sequence is A061852 and 99 times that is A008919.
Cf. A214927, A001232, A222814, A008918, A008919, A222813 (terms converted to decimal).
Cf. A355280 (palindromic binary numbers with no digit run of length < 2).

Programs

  • PARI
    concat(apply( {A061851_row(n)=[fromdigits(binary(m))|m<-A222813_row(n)]}, [1..11])) \\ M. F. Hasler, Oct 17 2022
    
  • Python
    def A061851_row(n): return [] if n < 2 else [10**n//9] if n < 6 else [
        m*10**(n//2) + A004086(m//10) for m in A355280_row(n//2+1)] if n&1 else [
        m*10**(n//2) + A004086(m) for m in sorted(A355280_row(n//2)+
                            [x*10+1-x%10 for x in A355280_row(n//2-1)])]
    # M. F. Hasler, Oct 17 2022

Formula

a(n) = A001232(n)/99 = A008918(n)/198.
a(n) = A007088(A222813(n)), where A007088 = write in binary. - M. F. Hasler, Oct 06 2022

A222811 Number of n-digit numbers N such that the reversal of N divides N.

Original entry on oeis.org

9, 18, 111, 212, 1128, 2067, 11123, 20270, 110440, 200971, 1101475, 2003592, 11005388
Offset: 1

Views

Author

N. J. A. Sloane, Mar 10 2013

Keywords

Comments

Suggested by A214927.
Even terms are roughly double the previous term. - David Consiglio, Jr., Mar 22 2013

Examples

			Some of the smallest solutions are:
[1, 2, 3, 4, 5, 6, 7, 8, 9] (so a(1) = 9),
[10, 11, 20, 22, 30, 33, 40, 44, 50, 55, 60, 66, 70, 77, 80, 88, 90, 99] (so a(2) = 18),
[100, 101, 110, 111, 121, 131, 141, 151, 161, 171, 181, 191, 200, 202, 212, 220, 222, 232, 242, 252, 262, 272, 282, 292, 300, 303, 313, 323, 330, 333, 343, 353, ...]
		

Crossrefs

Extensions

a(8) - a(11) from David Consiglio, Jr., Mar 22 2013
a(12)-a(13) from Giovanni Resta, Apr 01 2013
Showing 1-10 of 30 results. Next